diff --git a/assert/assertions.go b/assert/assertions.go index 4165fbd..5385499 100644 --- a/assert/assertions.go +++ b/assert/assertions.go @@ -801,7 +801,7 @@ func NoError(t TestingT, err error, msgAndArgs ...interface{}) bool { return true } - return Fail(t, fmt.Sprintf("No error is expected but got %v", err), msgAndArgs...) + return Fail(t, fmt.Sprintf("Received unexpected error %q", err), msgAndArgs...) } // Error asserts that a function returned an error (i.e. not `nil`).