Skip to content
Browse files

Delete a bit of now-dead code.

  • Loading branch information...
1 parent b7f29b5 commit 03a75f06018dd95b7d7595ff8cbb6c0c5590eae3 @marick committed Jan 12, 2013
Showing with 9 additions and 55 deletions.
  1. +9 −34 src/midje/ideas/reporting/string_format.clj
  2. +0 −4 src/midje/util/colorize.clj
  3. +0 −17 test/midje/util/t_colorize.clj
View
43 src/midje/ideas/reporting/string_format.clj
@@ -133,40 +133,15 @@
;;; Formatting Summary of Facts
-(defn print-clojure-test-result-lines [result]
- (when (pos? (:fail-count result))
- (println (color/note ">>> Output from clojure.test tests:"))
- (dorun (map (comp println color/colorize-deftest-output)
- (drop-last 2 (:lines result))))))
-
-(defn print-clojure-test-summary-lines [result]
- (println (color/note ">>> clojure.test summary:"))
- (println (first (take-last 2 (:lines result))))
- (println ( (if (pos? (:fail-count result)) color/fail color/pass)
- (last (:lines result)))))
-
-(defn- print-something-actually-happened-summary-results [result]
- (let [midje-failure-message (condp = (:fail result)
- 0 (color/pass (format "All claims (%d) have been confirmed." (:pass result)))
- 1 (str (color/fail "FAILURE:")
- (format " %d claim was not confirmed." (:fail result)))
- (str (color/fail "FAILURE:")
- (format " %d claims were not confirmed." (:fail result))))
- potential-consolation (condp = (:pass result)
- 0 ""
- 1 "(But 1 was.)"
- (format "(But %d were.)" (:pass result)))
-
- midje-consolation (if (pos? (:fail result)) potential-consolation "")]
- (println midje-failure-message midje-consolation)))
-
-(defn print-nothing-was-tried-summary-results []
- (println (color/note "No facts were checked. Is that what you wanted?")))
-
-(defn print-midje-summary-line [result]
- (if (pos? (+ (:fail result) (:pass result)))
- (print-something-actually-happened-summary-results result)
- (print-nothing-was-tried-summary-results)))
+(defn print-clojure-test-result-lines [result])
+
+(defn print-clojure-test-summary-lines [result])
+
+(defn- print-something-actually-happened-summary-results [result])
+
+(defn print-nothing-was-tried-summary-results [])
+
+(defn print-midje-summary-line [result])
(def ^{:private true} previous-failure-count-atom (atom 0))
View
4 src/midje/util/colorize.clj
@@ -26,7 +26,3 @@
(def pass identity)
(def note identity)))
-(defn colorize-deftest-output [s]
- (-> s
- (str/replace #"^FAIL" (fail "FAIL"))
- (str/replace #"^ERROR" (fail "ERROR"))))
View
17 test/midje/util/t_colorize.clj
@@ -38,20 +38,3 @@
(color/note "d")) => anything
(provided
(getenv "MIDJE_COLORIZE") => anything :times 0))
-
-
-
-(fact
- :check-only-at-load-time
- (colorize-deftest-output "FAIL in deftest failure message")
- => "\u001b[31mFAIL\u001b[0m in deftest failure message")
-
-(fact
- :check-only-at-load-time
- (colorize-deftest-output "ERROR in deftest failure message")
- => "\u001b[31mERROR\u001b[0m in deftest failure message")
-
-(fact
- :check-only-at-load-time
- (colorize-deftest-output "ERROR in deftest failure message ERROR")
- =not=> "\u001b[31mERROR\u001b[0m in deftest failure message \u001b[31mERROR\u001b[0m")

0 comments on commit 03a75f0

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