コード例 #1
0
			It("returns the capacity", func() {
				Ω(gotCapacity).Should(Equal(capacity))
			})
		})
	})

	Describe("List", func() {
		properties := garden.Properties{
			"A": "B",
		}

		var gotHandles []string

		itRetries(func() error {
			var err error
			gotHandles, err = conn.List(properties)
			return err
		}, func(err error) {
			innerConnection.ListReturns([]string{"a", "b"}, err)
		}, func() int {
			return innerConnection.ListCallCount()
		}, func() {
			It("calls through to garden", func() {
				Ω(innerConnection.ListCallCount()).Should(Equal(1))

				listedProperties := innerConnection.ListArgsForCall(0)
				Ω(listedProperties).Should(Equal(properties))
			})

			It("returns the handles", func() {
				Ω(gotHandles).Should(Equal([]string{"a", "b"}))