Created
June 21, 2014 08:57
-
-
Save muhuk/4ca3bfeaa2c44edfd0bb to your computer and use it in GitHub Desktop.
Midje prerequisites & apply
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FAIL at (test.clj:12) | |
These calls were not made the right number of times: | |
(--m-- :something ..a.. ..b..) [expected at least once, actually never called] | |
FAIL "foo" at (test.clj:10) | |
Expected: ..result.. | |
Actual: java.lang.AbstractMethodError | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns somens.test | |
(:require [clojure.test :refer :all] | |
[midje.sweet :refer :all])) | |
(defn foo [m-var params] | |
(let [m (find-var m-var)] | |
(apply m (cons :something params)))) | |
(fact "foo" | |
(foo ..m-var.. [..a.. ..b..]) => ..result.. | |
(provided (find-var ..m-var..) => --m-- | |
(--m-- :something ..a.. ..b..) => ..result..)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment