disaster := errors.New("nope") BeforeEach(func() { fakeVersionedSource.StreamOutReturns(nil, disaster) }) It("returns the error", func() { Ω(artifactSource.StreamTo(fakeDestination)).Should(Equal(disaster)) }) }) Context("when streaming in to the destination fails", func() { disaster := errors.New("nope") BeforeEach(func() { fakeDestination.StreamInReturns(disaster) }) It("returns the error", func() { Ω(artifactSource.StreamTo(fakeDestination)).Should(Equal(disaster)) }) }) }) Context("when the resource cannot stream out", func() { disaster := errors.New("nope") BeforeEach(func() { fakeVersionedSource.StreamOutReturns(nil, disaster) })