From 065b2a1e1109aba2f6bb0ff0fbe4cc94861da9df Mon Sep 17 00:00:00 2001 From: Stuart Sierra Date: Tue, 6 Jan 2009 15:00:05 +0000 Subject: test_is.clj: set-test is ignored when *load-tests* is false --- src/clojure/contrib/test_is.clj | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/clojure') diff --git a/src/clojure/contrib/test_is.clj b/src/clojure/contrib/test_is.clj index 280b5f96..b6c5944e 100644 --- a/src/clojure/contrib/test_is.clj +++ b/src/clojure/contrib/test_is.clj @@ -267,9 +267,12 @@ (defmacro set-test "Experimental. Sets :test metadata of the named var to a fn with the given body. - The var must already exist. Does not modify the value of the var." + The var must already exist. Does not modify the value of the var. + + When *load-tests* is false, set-test is ignored." [name & body] - `(alter-meta! (var ~name) assoc :test (fn [] ~@body))) + (when *load-tests* + `(alter-meta! (var ~name) assoc :test (fn [] ~@body)))) ;;; RUNNING TESTS -- cgit v1.2.3-70-g09d2