Clone this wiki locally
Midje can be used with leiningen's test plugin. You can wrap facts in either
(deftest one-fact-in-a-test (fact (+ 1 1) => 3)) (with-test (defn foo [x y] (* x y)) (fact (foo 1 2) => 3))
The output looks as you'd expect if you were using
Testing lein-test.test.deftest FAIL at (deftest.clj:10) Expected: 4 Actual: 3 FAIL at (deftest.clj:11) Expected: 4 Actual: 5 FAIL at (deftest.clj:7) Expected: 3 Actual: 2 Testing lein-test.test.with-test FAIL at (with_test.clj:8) Expected: 3 Actual: 2 Ran 3 tests containing 4 assertions. 4 failures, 0 errors.
lein test prints won't contain information about Midje failures. Therefore, I recommend you use the lein midje plugin.