Skip to content

Commit

Permalink
Use init form from test task.
Browse files Browse the repository at this point in the history
  • Loading branch information
technomancy committed Oct 1, 2010
1 parent 1210a0d commit d2677ff
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/leiningen/test.clj
Expand Up @@ -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)]
Expand Down Expand Up @@ -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)))]
Expand Down

0 comments on commit d2677ff

Please sign in to comment.