Ejemplo n.º 1
0
			It("returns the container handle", func() {
				Ω(gotHandle).Should(Equal("bach"))
			})
		})
	})

	Describe("Destroy", func() {
		handle := "mozart"

		itRetries(func() error {
			return conn.Destroy(handle)
		}, func(err error) {
			innerConnection.DestroyReturns(err)
		}, func() int {
			return innerConnection.DestroyCallCount()
		}, func() {
			It("calls through to garden", func() {
				Ω(innerConnection.DestroyCallCount()).Should(Equal(1))

				calledHandle := innerConnection.DestroyArgsForCall(0)
				Ω(calledHandle).Should(Equal(handle))
			})
		})
	})

	Describe("Property", func() {
		handle := "suitcase"
		property := "dfghjkl"

		var gotValue string
			It("returns the container handle", func() {
				Expect(gotHandle).To(Equal("bach"))
			})
		})
	})

	Describe("Destroy", func() {
		handle := "mozart"

		itRetries(func() error {
			return conn.Destroy(handle)
		}, func(err error) {
			innerConnection.DestroyReturns(err)
		}, func() int {
			return innerConnection.DestroyCallCount()
		}, func() {
			It("calls through to garden", func() {
				Expect(innerConnection.DestroyCallCount()).To(Equal(1))

				calledHandle := innerConnection.DestroyArgsForCall(0)
				Expect(calledHandle).To(Equal(handle))
			})
		})
	})

	Describe("Property", func() {
		handle := "suitcase"
		property := "dfghjkl"

		var gotValue string