changed leiningen/test to allow the call into the clojure.test report to
pass through the hook to the original multimethod
This commit is contained in:
parent
6f13cd4d21
commit
f4c2b97bc6
2 changed files with 12 additions and 1 deletions
|
@ -69,7 +69,8 @@
|
|||
first meta :ns ns-name)))
|
||||
(if (= :begin-test-ns (:type m#))
|
||||
(clojure.test/with-test-out
|
||||
(println "\nlein test" (ns-name (:ns m#))))
|
||||
(println "\nlein test" (ns-name (:ns m#)))
|
||||
(apply report# m# args#))
|
||||
(apply report# m# args#))))
|
||||
summary# (binding [clojure.test/*test-out* *out*]
|
||||
(apply ~'clojure.test/run-tests selected-namespaces#))]
|
||||
|
|
|
@ -44,3 +44,13 @@
|
|||
(deftest test-only-selector
|
||||
(test sample-no-aot-project ":only" "selectors/regular")
|
||||
(is (= (ran?) #{:regular})))
|
||||
|
||||
(def called? (atom false))
|
||||
|
||||
(defmethod clojure.test/report :begin-test-ns [_]
|
||||
(reset! called? true))
|
||||
|
||||
(deftest test-report-call-through
|
||||
(is (true? @called?))
|
||||
(reset! called? false))
|
||||
|
||||
|
|
Loading…
Reference in a new issue