} } }) It("logs an error as it retries", func() { err := operationUnderTest() Ω(err).ShouldNot(HaveOccurred()) Ω(output).Should(gbytes.Say("err")) ValidateInteractionsWithLockHandler(2) }) Context("more than 5 times", func() { BeforeEach(func() { fakeLockHandler.BroadcastLockPoolReturns([]byte("some git message"), errors.New("disaster")) }) It("shows the underlying git error", func() { err := operationUnderTest() Ω(err).Should(HaveOccurred()) Ω(output).Should(gbytes.Say("some git message")) ValidateInteractionsWithLockHandler(5) }) }) }) Context("for an expected reason", func() { BeforeEach(func() {