}) It("forwards it to the process", func() { Eventually(fakeProcess.SetTTYCallCount).Should(Equal(1)) Expect(fakeProcess.SetTTYArgsForCall(0)).To(Equal(garden.TTYSpec{ WindowSize: &garden.WindowSize{ Columns: 123, Rows: 456, }, })) }) Context("and setting the TTY on the process fails", func() { BeforeEach(func() { fakeProcess.SetTTYReturns(errors.New("oh no!")) }) It("forwards the error to the response", func() { var hijackOutput atc.HijackOutput err := conn.ReadJSON(&hijackOutput) Expect(err).NotTo(HaveOccurred()) Expect(hijackOutput).To(Equal(atc.HijackOutput{ Error: "oh no!", })) }) }) }) Context("when waiting on the process fails", func() {