Exemplo n.º 1
0
				calledSpec := innerConnection.CreateArgsForCall(0)
				Ω(calledSpec).Should(Equal(spec))
			})

			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() {