0.1.1 permalink Arrow_down_16x16



  • (call-faker faked-function args expectations)

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source midje/unprocessed.clj:72 top

(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 
	      (report {:type :mock-argument-match-failure
		      :function faked-function
		      :actual args
		      :position (:file-position (first expectations))})
	      (raise one-failure-per-test))
	 (swap! (found :count-atom) inc)
	 ((found :result-supplier)))))
Vars in midje.semi-sweet/call-faker: defn if-not inc let swap!
Used in 0 other vars

Comments top

No comments for call-faker. Log in to add a comment.