-
-
Notifications
You must be signed in to change notification settings - Fork 231
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
Allow hiding 'on_load' attribute. #131
Conversation
hide_on_load() -> | ||
% We _don't_ want on_load to be called. Listen out for it. | ||
register(on_load_listener, self()), | ||
meck:new(meck_on_load_module, [passthrough, hide_on_load]), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you remove hide_on_load
, then make test
fails with the following:
meck_on_load_tests: on_load_test_...*failed*
in function meck_on_load_tests:hide_on_load/0 (test/meck_on_load_tests.erl, line 21)
**error:unexpected_call_to_on_load
Hi, thank you so much for the PR. I'm not really a fan of the name
I particularly like the second one because it also signals that it has something to do with the backup modules. |
I prefer the first one. I don't think that people writing the test particularly care about backup or not. They just don't want Except that |
Agree, double-negatives are bad. Would you mind changing to |
Allow hiding 'on_load' attribute.
Again, thanks a lot! |
No problem. |
See #130.