Skip to content
Brian Marick edited this page May 18, 2014 · 2 revisions

This feature no longer exists in modern versions of Midje. Instead, use variant prerequisite arrows.

If you want to check that a function is never called, do this:

     (defn ostracized [n] (+ 300 n))
     (defn myfun [n] (+ n 33))
     
     (fact 
       (expect (myfun 3) => 36
               (not-called ostracized)))

expect and not-called are part of semi-sweet mode, the framework upon which midje.sweet is built. Though not as pretty, you can use semi-sweet mode inside facts.

Clone this wiki locally