Closed TC-yWu closed 3 years ago
This might be unexpected. If my_module
wasn't loaded or didn't exist before mocking, this is not so strange. However, if it was loaded it could be considered a desired feature that Meck loads it back into memory the last thing it does. Currently Meck relies on Erlang to automatically load the module when it is used the next time.
To clarify: the behavior for Meck has always been like this and it is not something we've considered before.
This is now fixed by #228.
The original module can not be recovered after passthrough meck.
Reproduction Steps
Expected behavior
erlang:module_loaded(my_module) return true.
Observed behavior
Here is my trace, please notice that the parameter no_passthrough_cover is expected to be a binary one. % 14:31:26 <0.4841.0>(my_module_meck) % meck_proc:export_original_cover(my_module, {false,no_passthrough_cover})
% 14:31:26 <0.4841.0>(my_module_meck) % meck_proc:export_original_cover/2 -> undefined
Versions