Permalink
Browse files

Use init form from test task.

  • Loading branch information...
technomancy committed Oct 1, 2010
1 parent 1210a0d commit d2677ff5f508a0f86b92a085593a6c9f4e25d44f
Showing with 2 additions and 9 deletions.
  1. +2 −9 src/leiningen/test.clj
View
@@ -6,11 +6,6 @@
[leiningen.compile :only [eval-in-project]])
(:import [java.io File]))
-(defn- init-args [java & files]
- (doseq [f files]
- (.setValue (.createArg java) "-i")
- (.setValue (.createArg java) f)))
-
(defn- form-for-hook-selectors [selectors]
`(when (seq ~selectors)
(if-let [add-hook# (resolve 'robert.hooke/add-hook)]
@@ -57,10 +52,8 @@ tests. If none are given, runs them all." ; TODO: update
(throw (Exception. "Args must be either all namespaces or keywords.")))
(eval-in-project project (form-for-testing-namespaces
nses (.getAbsolutePath result) (vec selectors))
- #(apply init-args %
- (if (seq selectors)
- ["@clojure/test.clj" "@robert/hooke.clj"]
- ["@clojure/test.clj"])))
+ (concat ['require ''clojure.test] (if (seq selectors)
+ [''robert.hooke])))
(if (and (.exists result) (pos? (.length result)))
(let [summary (read-string (slurp (.getAbsolutePath result)))
success? (zero? (+ (:error summary) (:fail summary)))]

0 comments on commit d2677ff

Please sign in to comment.