summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStuart Sierra <mail@stuartsierra.com>2010-10-01 16:26:33 -0400
committerStuart Halloway <stu@thinkrelevance.com>2010-11-05 09:01:04 -0700
commit6b6356340282e56162a6f365ec08281ad614b488 (patch)
tree2499ccaf625525656276fc10b1b1c41f20dea28c
parent6580859b08b4a609e5c5fe1e52dd9495f5b8140a (diff)
Document mutual exclusion of fixtures and test-ns-hook; refs #235
Signed-off-by: Stuart Halloway <stu@thinkrelevance.com>
-rw-r--r--src/clj/clojure/test.clj7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/clj/clojure/test.clj b/src/clj/clojure/test.clj
index 755ec0b4..2725e20b 100644
--- a/src/clj/clojure/test.clj
+++ b/src/clj/clojure/test.clj
@@ -145,6 +145,8 @@
(defn test-ns-hook []
(arithmetic))
+ Note: test-ns-hook prevents execution of fixtures (see below).
+
OMITTING TESTS FROM PRODUCTION CODE
@@ -153,7 +155,7 @@
being created by \"with-test\" or \"deftest\".
- FIXTURES (new)
+ FIXTURES
Fixtures allow you to run code before and after tests, to set up
the context in which tests should be run.
@@ -187,6 +189,9 @@
Attach \"once\" fixtures to the current namespace like this:
(use-fixtures :once fixture1 fixture2 ...)
+ Note: Fixtures and test-ns-hook are mutually incompatible. If you
+ are using test-ns-hook, fixture functions will *never* be run.
+
SAVING TEST OUTPUT TO A FILE