Ω(innerConnection.AttachCallCount()).Should(Equal(2)) handle, processID, calledProcessIO := innerConnection.AttachArgsForCall(1) Ω(handle).Should(Equal("la-contineur")) Ω(processID).Should(Equal(uint32(6))) Ω(calledProcessIO).Should(Equal(processIO)) }) }) Describe("SetTTY", func() { BeforeEach(func() { errs := make(chan error, 1) errs <- io.EOF close(errs) fakeProcess.SetTTYStub = func(garden.TTYSpec) error { return <-errs } }) It("reattaches on use of closed connection", func() { ttySpec := garden.TTYSpec{ WindowSize: &garden.WindowSize{Columns: 345678, Rows: 45689}, } Ω(process.SetTTY(ttySpec)).Should(Succeed()) Ω(fakeProcess.SetTTYArgsForCall(0)).Should(Equal(ttySpec)) Ω(innerConnection.AttachCallCount()).Should(Equal(2)) handle, processID, calledProcessIO := innerConnection.AttachArgsForCall(1) Ω(handle).Should(Equal("la-contineur")) Ω(processID).Should(Equal(uint32(6)))