-
Notifications
You must be signed in to change notification settings - Fork 117
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
Mock callbacks #200
Comments
This was actually very much on my radar as something I wanted to do. I will On Wed, Sep 30, 2015 at 12:14 PM, Matthew Turland [email protected]
|
I may be unique in this notion, but I sometimes find myself needing mock callbacks. I generally use these in tests in place of actual callbacks I'd pass to methods. I do two things with these:
The latter is the main annoying point, as I've tended to have to keep a separate flag that the function body modifies to indicate that it's been called.
Interoperability with Phake's API to verify calls (e.g. any, none, a specific quantity, etc.) and perform parameter assertions against callbacks, as we're currently able to do with mock object methods, would be a lot nicer than code I've tended to write to accomplish the same thing.
The text was updated successfully, but these errors were encountered: