circleci / bond

spying for tests
127 stars 28 forks source link

Allow replacements to be specified in with-stub. #6

Closed gordonsyme closed 9 years ago

gordonsyme commented 10 years ago

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.

marcomorain commented 9 years ago

LGTM.