Esempio n. 1
0
			Ω(actualGraceTime).Should(Equal(graceTime))
		})

		Context("when the request fails", func() {
			disaster := errors.New("banana")

			BeforeEach(func() {
				fakeConnection.SetGraceTimeReturns(disaster)
			})

			It("returns the error", func() {
				err := container.SetGraceTime(time.Second * 5)
				Ω(err).Should(Equal(disaster))
			})
		})
	})

	Context("when the request fails", func() {
		disaster := errors.New("oh no!")

		BeforeEach(func() {
			fakeConnection.NetOutReturns(disaster)
		})

		It("returns the error", func() {
			err := container.NetOut(garden.NetOutRule{})
			Ω(err).Should(Equal(disaster))
		})
	})
})