From 49005fe1960542f223c64b1af4e7544d34746a01 Mon Sep 17 00:00:00 2001 From: Kai Naschinski Date: Wed, 17 Jan 2024 12:04:21 +0100 Subject: [PATCH] docs: fix typo in example usage "occured" -> "occurred" Also change it in some test descriptions where it matters even less. --- docs/index.md | 2 +- internal/async_assertion_test.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/index.md b/docs/index.md index acdcbcbe8..e3385ecd6 100644 --- a/docs/index.md +++ b/docs/index.md @@ -161,7 +161,7 @@ Alternatively, such error assertions on multi return value functions can be simp Similar, asserting that no error occurred is supported, too (where the other return values are allowed to take on any value): ```go -Ω(MultipleReturnValuesFunc()).Error().ShouldNot(HaveOccured()) +Ω(MultipleReturnValuesFunc()).Error().ShouldNot(HaveOccurred()) ``` ### Annotating Assertions diff --git a/internal/async_assertion_test.go b/internal/async_assertion_test.go index 2809562e3..accdfe55c 100644 --- a/internal/async_assertion_test.go +++ b/internal/async_assertion_test.go @@ -180,7 +180,7 @@ var _ = Describe("Asynchronous Assertions", func() { Ω(ig.RegisteredHelpers).Should(ContainElement("(*AsyncAssertion).match")) }) - It("renders the matcher's error if an error occured", func() { + It("renders the matcher's error if an error occurred", func() { ig.G.Eventually(ERR_MATCH).WithTimeout(50 * time.Millisecond).WithPolling(10 * time.Millisecond).Should(SpecMatch()) Ω(ig.FailureMessage).Should(ContainSubstring("Timed out after")) Ω(ig.FailureMessage).Should(ContainSubstring("The matcher passed to Eventually returned the following error:")) @@ -443,7 +443,7 @@ var _ = Describe("Asynchronous Assertions", func() { Ω(ig.RegisteredHelpers).Should(ContainElement("(*AsyncAssertion).match")) }) - It("renders the matcher's error if an error occured", func() { + It("renders the matcher's error if an error occurred", func() { ig.G.Consistently(ERR_MATCH).Should(SpecMatch()) Ω(ig.FailureMessage).Should(ContainSubstring("Failed after")) Ω(ig.FailureMessage).Should(ContainSubstring("The matcher passed to Consistently returned the following error:")) @@ -1575,7 +1575,7 @@ sprocket: }) When("the actual error is because there was an assertion failure in the function, and there are return values", func() { - It("emits a clear message about the error having occured", func() { + It("emits a clear message about the error having occurred", func() { _, file, line, _ := runtime.Caller(0) ig.G.Eventually(func(g Gomega) int { g.Expect(true).To(BeFalse())