From b7c6a63fd5c0f7b8de8f8c24b1fd4057af265d51 Mon Sep 17 00:00:00 2001 From: Phil Hagelberg Date: Fri, 22 Jun 2012 13:19:46 -0700 Subject: [PATCH] Qualify implicit ::test profile. Fixes #659 for real, hopefully. --- leiningen-core/src/leiningen/core/project.clj | 2 +- src/leiningen/test.clj | 2 +- test/leiningen/test/compile.clj | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/leiningen-core/src/leiningen/core/project.clj b/leiningen-core/src/leiningen/core/project.clj index c9c9b1d3..333bc202 100755 --- a/leiningen-core/src/leiningen/core/project.clj +++ b/leiningen-core/src/leiningen/core/project.clj @@ -149,7 +149,7 @@ :resource-paths :compile-path]} :production {} - :test {:injections [hooke-injection]} + :leiningen.test/test {:injections [hooke-injection]} :update {:update :always} :offline {:offline? true} :debug {:debug true}})) diff --git a/src/leiningen/test.clj b/src/leiningen/test.clj index 139a6d4e..b179c21b 100644 --- a/src/leiningen/test.clj +++ b/src/leiningen/test.clj @@ -91,7 +91,7 @@ tests are run." [project & tests] (binding [main/*exit-process?* (not= :leiningen (:eval-in project)) *exit-after-tests* (not= :leiningen (:eval-in project))] - (let [project (project/merge-profiles project [:test]) + (let [project (project/merge-profiles project [::test]) [nses selectors] (read-args tests project) result (doto (File/createTempFile "lein" "result") .deleteOnExit) form (form-for-testing-namespaces nses (.getAbsolutePath result) diff --git a/test/leiningen/test/compile.clj b/test/leiningen/test/compile.clj index 148e84e1..5d247ba8 100644 --- a/test/leiningen/test/compile.clj +++ b/test/leiningen/test/compile.clj @@ -70,7 +70,10 @@ (is (empty? (.list (file (:compile-path tricky-name-project)))))) (deftest test-injection - (eval/eval-in-project sample-project '#'leiningen.core.injected/add-hook)) + (eval/eval-in-project (assoc sample-project + :injections ['(do (ns inject.stuff) + (def beef :hot))]) + '#'inject.stuff/beef)) ;; (deftest test-compile-java-main ;; (compile dev-deps-project))