You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
If an implementation of the behaviour raises an exception, then it should be possible to raise it using hammox.
If an implementation returns a bad value, then it is better to have a separate set of tests which ensures that the implementation returns only expected data.
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 Mox for that specific case. But what could be cool is to be able to tell to ignore spec checks)
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: