Basically just a (with-redefs foo (bond/spy bar) ... ) but a little tidier.
Useful when unit-testing integration points, where the function needs to return a value for the code being tested to continue, calling the function is undesirable because of side-effects, but validating the function was called correctly is still a useful test.
Basically just a (with-redefs foo (bond/spy bar) ... ) but a little tidier.
Useful when unit-testing integration points, where the function needs to return a value for the code being tested to continue, calling the function is undesirable because of side-effects, but validating the function was called correctly is still a useful test.