Skip to content
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

Add a matched() -> bool method to mock #125

Merged
merged 1 commit into from
Jul 25, 2020

Conversation

max-b
Copy link
Contributor

@max-b max-b commented Jul 15, 2020

Hi!

Thanks so much for this library - I really appreciate the work you've put into it! I have a slightly unusual use case surrounding testing async processing and I'd basically like to check to see if the mock has matched while not panicking. It looks like mockito::mock isn't UnwindSafe so catching the assert panic requires wrapping it in a AssertUnwindSafe which I'm not totally sure is correct.

This just provides a matched method that returns a bool for this particular use case. Let me know what you think/if it's appropriate or not!

Thanks!!!

@lipanski
Copy link
Owner

@max-b looks good, thanks for your contribution (and special 🥇 for updating the docs). I think this can fit into the library so I'm going to merge.

@lipanski lipanski merged commit 8044c6b into lipanski:master Jul 25, 2020
@lipanski
Copy link
Owner

Released in 0.27.0 🚀

@max-b
Copy link
Contributor Author

max-b commented Jul 27, 2020

🎉 thanks!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants