fakeContainer.PropertyStub = func(name string) (string, error) { switch name { case "concourse:exit-status": return "123", nil default: return "", errors.New("unstubbed property: " + name) } } }) It("exits with success", func() { Eventually(process.Wait()).Should(Receive(BeNil())) }) It("does not attach to any process", func() { Ω(fakeContainer.AttachCallCount()).Should(BeZero()) }) It("is not successful", func() { Eventually(process.Wait()).Should(Receive(BeNil())) var success Success Ω(step.Result(&success)).Should(BeTrue()) Ω(bool(success)).Should(BeFalse()) }) It("reports its exit status", func() { Eventually(process.Wait()).Should(Receive(BeNil())) var status ExitStatus Ω(step.Result(&status)).Should(BeTrue())