-
-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VerifyNoMoreInteractions is not working as expected #34
Comments
Hello and thank you for the feedback.
And this test should pass:
So I will fix the current bug by replicating mockito behaviour. |
Thanks!, really love to see this lib in Golang. Hope it gets enough attention from the Go Devs 😉 |
Done, the behavior of this check is now aligned with mockito. |
Checked, and now it is working as expected. However I've found another, much more subtle issue. I'm opening another ticket to not mix things up. |
First, kudos for this great library, I come from Java world and, honestly, it has been quite a bummer how bad is mocking in Go...
Now, I've been evaluating your library to introduce it in our stack, and while doing so I've found that the behaviour of VerifyNoMoreInteractions is not doing what the GoDoc says it does.
The GoDoc says:
But when I've tried exactly that, the test is not failing as expected. Moreover, I've downloaded this project and tweaked the test that is verifying the VerifyNoMoreInteractions method to follow this exact GoDoc (i.e. I've added a verify(m, Once()) and I could see the same behaviour.
When I run this, I get:
../mockio/tests/verify/common.go:40: Expected error, got nothing
The text was updated successfully, but these errors were encountered: