(defn call-faker [faked-function args expectations]
"This is the function that handles all mocked calls. Don't use it."
(let [found (find-matching-call faked-function args expectations)]
(if-not found
(do
(report {:type :mock-argument-match-failure
:function faked-function
:actual args
:position (:file-position (first expectations))})
(raise one-failure-per-test))
(do
(swap! (found :count-atom) inc)
((found :result-supplier)))))
)
Comments top
No comments for call-faker. Log in to add a comment.