BeforeEach(func() { var err error request, err = http.NewRequest("GET", server.URL, nil) Ω(err).ShouldNot(HaveOccurred()) }) JustBeforeEach(func() { var err error response, err = client.Do(request) Ω(err).ShouldNot(HaveOccurred()) }) Context("when subscribing to the build succeeds", func() { var fakeEventSource *dbfakes.FakeEventSource BeforeEach(func() { returnedEvents := []atc.Event{ fakeEvent{"e1"}, fakeEvent{"e2"}, fakeEvent{"e3"}, } fakeEventSource = new(dbfakes.FakeEventSource) buildsDB.GetBuildEventsStub = func(buildID int, from uint) (db.EventSource, error) { Ω(buildID).Should(Equal(128)) fakeEventSource.NextStub = func() (atc.Event, error) { defer GinkgoRecover()