}) Describe("RunContainer", func() { var result bool var runRequest executor.RunRequest BeforeEach(func() { runRequest = executor.NewRunRequest(expectedGuid, &executor.RunInfo{}, executor.Tags{}) }) JustBeforeEach(func() { result = containerDelegate.RunContainer(logger, &runRequest) }) It("runs the container", func() { Expect(executorClient.RunContainerCallCount()).To(Equal(1)) _, runReq := executorClient.RunContainerArgsForCall(0) Expect(*runReq).To(Equal(runRequest)) }) Context("when running succeeds", func() { It("returns true", func() { Expect(result).To(BeTrue()) }) It("logs the running", func() { Expect(logger).To(gbytes.Say(sessionPrefix + ".running-container")) Expect(logger).To(gbytes.Say(sessionPrefix + ".succeeded-running-container")) }) })