Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix Leiningen 2.0 compatibility with profiles and exit codes. Make 0.…

…0.7 release.
  • Loading branch information...
commit fbf73518562d0504ea0124c5a4266a6cee6ad102 1 parent 0915bfd
@seancorfield seancorfield authored
Showing with 8 additions and 12 deletions.
  1. +3 −3 README.md
  2. +1 −1  project.clj
  3. +4 −8 src/leiningen/expectations.clj
View
6 README.md
@@ -9,10 +9,10 @@ For Leiningen 2.0:
Declare `lein-expectations` in `project.clj`:
```clojure
-:plugins [[lein-expectations "0.0.5"]]
+:plugins [[lein-expectations "0.0.7"]]
```
-For Leiningen 1.x:
+For Leiningen 1.x - use lein-expectations 0.0.5 or earlier:
Declare `lein-expectations` in `project.clj`:
@@ -52,4 +52,4 @@ Distributed under the Eclipse Public License, the same as Clojure.
## Contributors
-Lee Hinman
+Sean Corfield, Lee Hinman
View
2  project.clj
@@ -1,3 +1,3 @@
-(defproject lein-expectations "0.0.7-SNAPSHOT"
+(defproject lein-expectations "0.0.7"
:description "Leiningen plugin to run tests written using the expectations library."
:eval-in-leiningen true)
View
12 src/leiningen/expectations.clj
@@ -65,11 +65,7 @@
(shutdown-agents))
'(require ['expectations]))
(if (and (.exists results) (pos? (.length results)))
- (let [summary (read-string (slurp path))
- success? (zero? (+ (:fail summary) (:error summary)))]
- (if (and
- (not (= :leiningen (:eval-in project)))
- *exit-after-tests*)
- (leiningen.core.main/exit (+ (:fail summary) (:error summary))))
- (if success? 0 1))
- 1)))
+ (when-not (let [summary (read-string (slurp path))]
+ (zero? (+ (:fail summary) (:error summary))))
+ (leiningen.core.main/abort))
+ (leiningen.core.main/abort "Unable to read results."))))
Please sign in to comment.
Something went wrong with that request. Please try again.