Slamhound throws exception on midje checkers
rdoh opened this issue · 2 comments
rdoh commented
Running slamhound on this code:
(ns foo
(:use midje.sweet))
(defn kill-slamhound []
(throws Exception ("bar")))
causes:
UnsupportedOperationException nth not supported on this type: Symbol clojure.lang.RT.nthFrom (RT.java:857)
Everything is fine if I explicitly require the checker from its own namespace like this:
(ns foo
(:require [midje.checking.checkers.simple :as checkers]))
(defn kill-slamhound []
(checkers/throws Exception "bar"))
I assume this is a result of the macro "shortcomings" mentioned in the docs but thought it was worth reporting as it prevents us running slamhound on our test suite.
guns commented
Hello,
Current master transforms your buffer:
(ns foo
(:use midje.sweet))
(defn kill-slamhound []
(throws Exception ("bar")))
into:
(ns foo
(:require [midje.sweet :refer :all]))
(defn kill-slamhound []
(throws Exception ("bar")))
Could you please test and corroborate?