I'm trying to add some clojure.test/assert-expr methods to help with
failure reporting and I can't find much information on the topic. I'm
wondering if I'm on the right track. The only way I've been able to get it
to work is if the defmethod happens with *ns* bound to 'clojure.test.
The following code appears to work (although the actual method is useless.)
Is this the proper way to go about adding clojure.test/assert-expr methods?
(ns blammo.core-test
(:use clojure.test
blammo.core))
(binding [*ns* 'clojure.test]
(defmethod clojure.test/assert-expr 'fail [msg form]
`(clojure.test/do-report {:type :fail :expected nil :actual nil
:message ~msg})))
(deftest a-test
(is (fail) "Failure Message"))
Thanks,
Ryan
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en