Permalink
Browse files

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

…0.7 release.
  • Loading branch information...
1 parent 0915bfd commit fbf73518562d0504ea0124c5a4266a6cee6ad102 @seancorfield seancorfield committed Aug 6, 2012
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
@@ -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
@@ -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)
@@ -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."))))

0 comments on commit fbf7351

Please sign in to comment.