Prerequisites that throw exceptions - marick/Midje GitHub Wiki

Available in 1.4

You can ask that a prerequisite throw an exception when it's called:

(unfinished f)

(defn counter [n]
  (try
    (f n)
  (catch Exception ex
    0)))
      
(fact
  (counter 4) => 0
  (provided
    (f 4) =throws=> (NullPointerException.)))