Context("when deleting the start messages fails", func() { BeforeEach(func() { storeAdapter.DeleteErrInjector = fakestoreadapter.NewFakeStoreAdapterErrorInjector("start", errors.New("oops")) }) It("should return an error", func() { Ω(err).Should(HaveOccurred()) }) }) }) Context("when the message fails to send", func() { BeforeEach(func() { messageBus.WhenPublishing("hm9000.start", func(*nats.Msg) error { return errors.New("oops") }) }) It("should return an error", func() { Ω(err).Should(HaveOccurred()) }) It("should not increment the metrics", func() { Ω(metricsAccountant.IncrementedStarts).Should(BeEmpty()) }) }) }) Context("When the message has already been sent", func() { BeforeEach(func() {