Skip to content

Instantly share code, notes, and snippets.

@muhuk
Created June 21, 2014 08:57
Show Gist options
  • Save muhuk/4ca3bfeaa2c44edfd0bb to your computer and use it in GitHub Desktop.
Save muhuk/4ca3bfeaa2c44edfd0bb to your computer and use it in GitHub Desktop.
Midje prerequisites & apply
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
(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