Iβm using clojure.test on a project now after using Midje for a long time. And I miss provided
greatly (https://github.com/marick/Midje/wiki/Describing-one-checkable's-prerequisites). If you use clojure.test, what do you use with it to test that the function under test calls another function with certain arguments?
@ljosa I'd be somewhat inclined to consider that a smell in unit testing, to be honest.
But, if you must, you can use with-redefs
to provide a redefinition of the function that saves its arguments to a local atom
or something similar...
Yes, Iβve done that a little, but itβs extremely clunky.
Which is nature's way of saying "Perhaps you shouldn't be doing this?" π
Would it make you feel better if we called it integration testing? π
Not much, no π I use Expectations and it has a side-effects
function which does this and I think I've used it just once. Maybe twice. In 22,000 lines of Clojure test code at work.