Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix junit runner

  • Loading branch information...
commit 4b776f7946ad22ff1e7f829818a30686091be494 1 parent 891562f
@jaycfields authored
View
12 .idea/libraries/lib.xml
@@ -1,12 +0,0 @@
-<component name="libraryTable">
- <library name="lib">
- <CLASSES>
- <root url="file://$PROJECT_DIR$/lib" />
- <root url="file://$PROJECT_DIR$/lib/dev" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- <jarDirectory url="file://$PROJECT_DIR$/lib" recursive="false" />
- <jarDirectory url="file://$PROJECT_DIR$/lib/dev" recursive="false" />
- </library>
-</component>
View
2  expectations.iml
@@ -15,7 +15,7 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="library" name="lib" level="project" />
+ <orderEntry type="library" name="lib/jars" level="project" />
</component>
</module>
View
9 src/clojure/expectations.clj
@@ -1,6 +1,5 @@
(ns expectations
(:use clojure.set)
- (:import [expectations ScenarioFailure])
(:require clojure.template clojure.string clojure.pprint clojure.data))
(def nothing "no arg given")
@@ -121,6 +120,7 @@
(defn ^{:dynamic true} ignored-fns [{:keys [className fileName]}]
(when *prune-stacktrace*
(or (= fileName "expectations.clj")
+ (= fileName "expectations_options.clj")
(= fileName "NO_SOURCE_FILE")
(= fileName "interruptible_eval.clj")
(re-seq #"clojure\.lang" className)
@@ -161,8 +161,7 @@
(fail *test-name* *test-meta* message)))
(defmethod report :error [{:keys [result raw] :as m}]
- (when-not (instance? ScenarioFailure result)
- (inc-report-counter :error))
+ (inc-report-counter :error)
(let [current-test *test-var*
message (string-join "\n"
[(when reminder (colorize-warn (str " ***** " (clojure.string/upper-case reminder) " *****")))
@@ -170,9 +169,7 @@
(when (show-raw-choice) (colorize-raw (raw-str raw))))
(when-let [msg (:expected-message m)] (str " exp-msg: " msg))
(when-let [msg (:actual-message m)] (str " act-msg: " msg))
- (if (instance? ScenarioFailure result)
- (.getMessage result)
- (str " threw: " (class result) " - " (.getMessage result)))
+ (str " threw: " (class result) " - " (.getMessage result))
(pruned-stack-trace result)])]
(alter-meta! current-test
assoc :status [:error message (:line *test-meta*)])
View
3  src/clojure/expectations/junit/runner.clj
@@ -27,6 +27,7 @@
(defn ignored-fns [{:keys [className fileName]}]
(or (= fileName "expectations.clj")
+ (= fileName "expectations_options.clj")
(re-seq #"clojure.lang" className)
(re-seq #"clojure.core" className)
(re-seq #"clojure.main" className)
@@ -48,7 +49,7 @@
_ (doseq [{:keys [absolutePath]} files] (load-file absolutePath))
file-names (set (map :absolutePath files))
suite-description (Description/createSuiteDescription (-> source class .getName) empty-ann-arr)
- filtered-vars (->> (all-ns) (expectations/->expectation) (filter (partial in-loaded-file? file-names)))
+ filtered-vars (->> (all-ns) (mapcat expectations/->expectation) (filter (partial in-loaded-file? file-names)))
descs (reduce create-desc {} filtered-vars)]
(doseq [desc (vals descs)] (.addChild suite-description desc))
(proxy [Runner] []
View
9 src/java/expectations/ScenarioFailure.java
@@ -1,9 +0,0 @@
-package expectations;
-
-public class ScenarioFailure extends RuntimeException {
- public ScenarioFailure(String message) {
- super(message);
- }
-}
-
-

0 comments on commit 4b776f7

Please sign in to comment.
Something went wrong with that request. Please try again.