Context("when the user is not set", func() { It("returns an error", func() { _, err := container.Run(garden.ProcessSpec{ Path: "whoami", Args: []string{}, }, garden.ProcessIO{}) Expect(err).To(MatchError(ContainSubstring("A User for the process to run as must be specified"))) }) }) Context("when spawning fails", func() { disaster := errors.New("oh no!") JustBeforeEach(func() { fakeProcessTracker.RunReturns(nil, disaster) }) It("returns the error", func() { _, err := container.Run(garden.ProcessSpec{ Path: "/some/script", User: "******", }, garden.ProcessIO{}) Expect(err).To(Equal(disaster)) }) }) }) Describe("Attaching", func() { Context("to a started process", func() { JustBeforeEach(func() {