Fork me on GitHub
#testing
<
2016-12-06
>
metametadata10:12:14

you could write a totally custom helper function/macro for checking the thrown exception without using (is (thrown? ,,,)), smt. like this:

(defn is-thrown
  [expr-under-test expected-stuff-about-the-exception]
  (try
     (expr-under-test)
     (catch e
        ; assert the exception here; test can be failed using (is nil "message here")
))
; fail test if exception was not thrown at all
)

metametadata10:12:55

then use it in the tests like this: (is-thrown #(my-func 1 2 3) {:expected-ex-data {}})

karlis15:12:58

yeah, this seems like the way to go, thanks for the ideas!