mockfn is a library supporting mockist test-driven-development in Clojure. It is meant to be used alongside a regular testing framework such as
It provides two macros to be used in tests. The first,
providing, replaces a function with a configured mock.
The second macro,
verifying, works similarly, but also defines an expectation for the number of times a call should be performed during the test.
Argument matchers are also supported: