meck
meck
A mocking library for Erlang.
Introduction
With meck you can easily mock modules in Erlang. You can also perform some basic validations on the mocked modules, such as making sure no unexpected exceptions occurred or looking at the call history.
Features
Automatic renaming and restoration of original modules
Automatic backup and restore of cover data
Changing return values using sequences and loops of static values
Pass through: use functions from the original module
Mock is linked to the creating process (disable with no_link)
Complete call history showing calls, results and exceptions
Mocking of sticky modules (using the option unstick)
Throwing of expected exceptions that keeps the module valid
See also https://github.com/eproxus/meck
- Sources inherited from project devel:languages:erlang
- Download package
-
Checkout Package
osc -A https://api.opensuse.org checkout home:licehunter:staging/erlang-meck && cd $_
- Create Badge
Source Files
Filename | Size | Changed |
---|---|---|
_service | 0000000471 471 Bytes | |
_servicedata | 0000000225 225 Bytes | |
erlang-meck.changes | 0000007395 7.22 KB | |
erlang-meck.spec | 0000001729 1.69 KB | |
meck-0.9.2+git20211002.cc47aab.tar.bz2 | 0000047732 46.6 KB |
Latest Revision
- Ship license file - Update to version 0.9.2+git20211002.cc47aab: * Fix typos * Fix calling mocked modules from expectation fun. * Point to correct Erlang version list * Update build badge * Bump least compatible Erlang/OTP version to 22 * Update workflow to use setup-beam * Increase meck_proc stop timeout to infinity * Leave module loaded state as it was * Add sponsorship link, remove build tool badge * Remove deprecated app file field * Version 0.9.2 * Add a further caveat to using `meck` with `ct` * Add OTP 24 to build matrix * Fix a dialyzer-issued warning * Version 0.9.1 * Remove unused chandler tool from cut script check * Add to changelog * Rename module name in type specs * Use Unite for EUnit tests * Clarify and fix example of passthrough/1 * Correct type spec for do_delete_expect/6 * Aim for repeatability * Imagine this is a possible solution to a past requirement * Broaden our check/test scope * Improve repeatability * Fix static analysis (dialyzer) -identified issue * Be stricter in our static analysis
Comments 0