Closed williandandrade closed 1 year ago
Hi, just a little godoc issue at https://pkg.go.dev/github.com/onsi/gomega@v1.27.7#MatchError
godoc
In the example it says:
Expect(err).Should(MatchError("an error")) //asserts that err.Error() == "an error" Expect(err).Should(MatchError(SomeError)) //asserts that err == SomeError (via reflect.DeepEqual) Expect(err).Should(MatchError(ContainsSubstring("sprocket not found"))) // asserts that edrr.Error() contains substring "sprocket not found"
But the correct method to use is ContainSubstring.
ContainSubstring
I found another file to be updated, so here is the two files:
thanks - are you up for submitting a PR for this?
sure
Hi, just a little
godoc
issue at https://pkg.go.dev/github.com/onsi/gomega@v1.27.7#MatchErrorIn the example it says:
But the correct method to use is
ContainSubstring
.I found another file to be updated, so here is the two files: