Last active
December 18, 2015 04:18
-
-
Save dcmoore/5723975 to your computer and use it in GitHub Desktop.
test profile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/leiningen/spec.clj b/src/leiningen/spec.clj | |
index 33e404a..c6d39bd 100644 | |
--- a/src/leiningen/spec.clj | |
+++ b/src/leiningen/spec.clj | |
@@ -42,6 +42,13 @@ | |
'leiningen.compile) | |
((ns-resolve 'leiningen.compile 'prep) project false)))) | |
+(defn- merge-profiles-if-they-exist [project profiles] | |
+ (try | |
+ (require 'leiningen.core.project) | |
+ ((ns-resolve 'leiningen.core.project 'merge-profiles) project profiles) | |
+ (catch java.io.FileNotFoundException e | |
+ project))) | |
+ | |
(defn spec | |
"Speclj - pronounced \"speckle\": a TDD/BDD framework for Clojure. | |
@@ -52,12 +59,13 @@ documentation, as opposed to this message provided by Leiningen, try this: | |
That ought to do the trick." | |
[project & args] | |
- (prepare project) | |
- (let [speclj-args (cons "-c" args) | |
- classpath (compute-classpath-string project) | |
- jvm-args ["-cp" classpath "-Dspeclj.invocation=lein spec"]] | |
- (try | |
- (require 'leiningen.core.main) | |
- ((ns-resolve (the-ns 'leiningen.core.main) 'exit) (java jvm-args "speclj.main" speclj-args (:root project))) | |
- (catch java.io.FileNotFoundException e | |
- (java jvm-args "speclj.main" speclj-args (:root project)))))) | |
+ (let [project (merge-profiles-if-they-exist project [:leiningen/test :test])] | |
+ (prepare project) | |
+ (let [speclj-args (cons "-c" args) | |
+ classpath (compute-classpath-string project) | |
+ jvm-args ["-cp" classpath "-Dspeclj.invocation=lein spec"]] | |
+ (try | |
+ (require 'leiningen.core.main) | |
+ ((ns-resolve (the-ns 'leiningen.core.main) 'exit) (java jvm-args "speclj.main" speclj-args (:root project))) | |
+ (catch java.io.FileNotFoundException e | |
+ (java jvm-args "speclj.main" speclj-args (:root project))))))) | |
diff --git a/src/speclj/version.clj b/src/speclj/version.clj | |
index ad5bb6b..0cdb73c 100644 | |
--- a/src/speclj/version.clj | |
+++ b/src/speclj/version.clj | |
@@ -2,8 +2,8 @@ | |
(:require [clojure.string :as str])) | |
(def major 2) | |
-(def minor 7) | |
-(def tiny 3) | |
+(def minor 8) | |
+(def tiny 0) | |
(def snapshot false) | |
(def string | |
(str |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment