   "Returns a TestCase for a Namespace.  If the namespace's :test
   metadata is a TestCase, returns that.  If the namespace's :test
   metadata is another namespace, recurses on that.  If the
-  namespace's :test metadata is a function, generates a TestCase with
-  an assertion that calls the function.  If none of these are true,
-  returns nil."  [n]
-  (cond (= ::TestCase (type (:test (meta n))))
-        (:test (meta n))
-
-        (instance? clojure.lang.Namespace (:test (meta n)))
-        (ns-test-case (:test (meta n)))
-
-        (fn? (:test (meta n)))
-        (with-meta (TestCase [] [(:test (meta n))])
-          {:doc "Namespace :test metadata function."
-           :name (ns-name n)})
-
-        :else nil))
+  namespace's :test metadata is a symbol, require's that namespace and
+  recurses.  If the namespace's :test metadata is a function,
+  generates a TestCase with an assertion that calls the function.  If
+  none of these are true, returns nil."  [n]
+  (let [t (:test (meta n))]
+    (cond (= ::TestCase (type t))
+          t
+
+          (instance? clojure.lang.Namespace t)
+          (ns-test-case t)
+
+          (symbol? t)
+          (do (require t)
+              (ns-test-case (the-ns t)))
+
+          (fn? t)
+          (TestCase [] [t]
+                    {:doc "Namespace :test metadata function."
+                     :name (ns-name n)}
+                    nil)
+
+          :else nil)))
  
 (defn test-ns
   "Finds and runs a TestCase for the namespace."

;; source is the TestCase, error is the java.lang.Throwable.
(deftype TestThrown [source error]
  TestSuccess (success? [] false))

;; TODO: fix source field: should be the assertion (optionally
;; compiled as a fn) with :doc, :name, :line, :file metadata, not the
;; source form of the assertion.

;; AssertionPassed is returned by an Assertion whose expression
;; evaluates logical true.

        (:test (meta v))

        (fn? (:test (meta v)))
        (TestCase [] [(:test (meta v))]
                  {:doc "Var :test metadata function."
                   :name (:name (meta v))
                   :ns (:ns (meta v))}
                  nil)

        :else nil))
 
