-
Notifications
You must be signed in to change notification settings - Fork 25
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
How to test bad behaviour #142
Comments
If an implementation of the behaviour raises an exception, then it should be possible to raise it using hammox. |
The goal here is not to test the implementations, but how the code that is calling the implementations reacts when the implementation is not correct. For instance you may want to just log an error, or to fallback to a specific action, or just crash. I can just define an implementation module in the test, but it's cool to be able to mock just one function. I just used |
Suppose I have a GenServer that calls a callback module implementing some behaviour.
I want to test that my GenServer does the right thing when the module does not return expected values. But hammox will not let me badly implement a behaviour.
Is there a way to opt-out type checking for a mock ?
The text was updated successfully, but these errors were encountered: