Creates an expectation map that a particular call will be made. When it is made,
the result is to be returned. Either form may contain bound variables.
Example: (let [a 5] (fake (f a) => a))
(defmacro fake
"Creates an expectation map that a particular call will be made. When it is made,
the result is to be returned. Either form may contain bound variables.
Example: (let [a 5] (fake (f a) => a))"
[call-form => result]
`{:function (def ~(first call-form))
:arg-matchers (map arg-matcher-maker [~@(rest call-form)])
:call-text-for-failures (str '~call-form)
:result-supplier (fn [] ~result)
:count-atom (atom 0)
:file-position (user-file-position)}
)
Comments top
No comments for fake. Log in to add a comment.