Changelog
View Source[0.1.0] - 2026-08-21
First working release. Mocking in 0.0.1 raised UndefinedFunctionError on any call to a function that was not the most recently mocked one.
Added
- Mock implementations now receive the arguments they are called with, so functions of arity 1 and above can be mocked.
- Several functions in the same module can be mocked at the same time.
- Mocks are keyed by arity, so
fun/0andfun/1are mocked independently.
Fixed
- The original module is now loaded from the beam's abstract code, so non-mocked functions keep working while a module is mocked.
reset/1unloads the generated original module and clears the module's mock entries.
Known limitations
- Macros and
behaviour_info/1are not carried into a mocked module. - Mocking a module recompiles it, which purges old code and can kill processes executing it.
[0.0.1] - 2024-05-11
Initial release.