Ω(savedEvent).Should(Equal(event.Error{ Message: "nope", Origin: event.Origin{ Type: event.OriginTypeTask, Name: "some-task", Location: location, }, })) }) }) Describe("Stdout", func() { var writer io.Writer BeforeEach(func() { writer = executionDelegate.Stdout() }) It("saves log events with the correct origin", func() { _, err := writer.Write([]byte("some stdout")) Ω(err).ShouldNot(HaveOccurred()) Ω(fakeDB.SaveBuildEventCallCount()).Should(Equal(1)) savedBuildID, savedEvent := fakeDB.SaveBuildEventArgsForCall(0) Ω(savedBuildID).Should(Equal(buildID)) Ω(savedEvent).Should(Equal(event.Log{ Origin: event.Origin{ Type: event.OriginTypeTask, Name: "some-task", Source: event.OriginSourceStdout,