Expect(pid).To(Equal(uint32(1))) Expect(process.ID()).To(Equal(uint32(42))) Eventually(stdout).Should(gbytes.Say("hi out\n")) Eventually(stderr).Should(gbytes.Say("hi err\n")) Expect(process.Wait()).To(Equal(123)) }) }) Context("when attaching fails", func() { disaster := errors.New("oh no!") JustBeforeEach(func() { fakeProcessTracker.AttachReturns(nil, disaster) }) It("returns the error", func() { _, err := container.Attach(42, garden.ProcessIO{}) Expect(err).To(Equal(disaster)) }) }) }) }) func uint64ptr(n uint64) *uint64 { return &n }