Context("when setting the property fails", func() { BeforeEach(func() { fakeContainer.SetPropertyReturns(errors.New("oh no!")) }) It("returns an error", func() { err := container.SetProperty("some-property", "some-value") Ω(err).Should(HaveOccurred()) }) }) }) Describe("removing", func() { Context("when removing the property succeeds", func() { BeforeEach(func() { fakeContainer.RemovePropertyReturns(nil) }) It("returns the property from the container", func() { err := container.RemoveProperty("some-property") Ω(err).ShouldNot(HaveOccurred()) Ω(fakeContainer.RemovePropertyCallCount()).Should(Equal(1)) name := fakeContainer.RemovePropertyArgsForCall(0) Ω(name).Should(Equal("some-property")) }) itResetsGraceTimeWhenHandling(func() { err := container.RemoveProperty("some-property") Ω(err).ShouldNot(HaveOccurred())