fakeContainerCmder.CmdStub = func(path string, args ...string) *exec.Cmd { return exec.Command("dosh", append([]string{path}, args...)...) } requestedIO := garden.ProcessIO{Stdout: gbytes.NewBuffer()} requestedTTY := &garden.TTYSpec{ WindowSize: &garden.WindowSize{1, 2}, } container.Run(garden.ProcessSpec{ Path: "some-path", Args: []string{"an-arg", "another-arg"}, TTY: requestedTTY, }, requestedIO) Expect(fakeProcessTracker.RunCallCount()).To(Equal(1)) _, cmd, io, tty, _ := fakeProcessTracker.RunArgsForCall(0) Expect(cmd.Path).To(Equal("dosh")) Expect(cmd.Args).To(Equal([]string{"dosh", "some-path", "an-arg", "another-arg"})) Expect(io).To(Equal(requestedIO)) Expect(tty).To(Equal(requestedTTY)) }) PIt("requests sequential process ids", func() {}) }) Describe("Attach", func() { It("attaches to the requested process", func() { requestedIO := garden.ProcessIO{Stdout: gbytes.NewBuffer()} container.Attach(33, requestedIO)