Skip to content

Commit

Permalink
docs: fix typo in example usage "occured" -> "occurred"
Browse files Browse the repository at this point in the history
Also change it in some test descriptions where it matters even less.
  • Loading branch information
watzkuh authored and onsi committed Jan 17, 2024
1 parent f1c8757 commit 49005fe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/index.md
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions internal/async_assertion_test.go
Expand Up @@ -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:"))
Expand Down Expand Up @@ -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:"))
Expand Down Expand Up @@ -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())
Expand Down

0 comments on commit 49005fe

Please sign in to comment.