Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Use init form from test task.

  • Loading branch information...
commit d2677ff5f508a0f86b92a085593a6c9f4e25d44f 1 parent 1210a0d
@technomancy technomancy authored
Showing with 2 additions and 9 deletions.
  1. +2 −9 src/leiningen/test.clj
View
11 src/leiningen/test.clj
@@ -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)))]
Please sign in to comment.
Something went wrong with that request. Please try again.