specific
specific copied to clipboard
Using (calls) to count the calls to a double is misleading when it's not a double
specific.core/calls returns a vector of call tuples, except when the function being checked is not a test double. In that case, it returns a map with an error message. However, this means that you can't rely on calls to have the right count, in order to write tests like this:
(is (= 3 (calls my-mock)))
Instead, specific.core/calls should either raise an exception or report a clojure.test error when it is called with a non-double function.