}) }) Describe("signalling", func() { var stopped chan struct{} BeforeEach(func() { stopped = make(chan struct{}) fakeProcess.WaitStub = func() (int, error) { <-stopped return 128 + 15, nil } fakeContainer.StopStub = func(bool) error { close(stopped) return nil } }) It("stops the container", func() { process.Signal(os.Interrupt) Eventually(process.Wait()).Should(Receive(Equal(ErrInterrupted))) Ω(fakeContainer.StopCallCount()).Should(Equal(1)) }) }) Describe("releasing", func() { It("releases the container", func() { Ω(fakeContainer.ReleaseCallCount()).Should(BeZero())