Skip to content

Commit

Permalink
[Issue #82] removed unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexBaranosky committed Feb 19, 2012
1 parent c5213ac commit c215fb9
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 22 deletions.
Empty file.
41 changes: 19 additions & 22 deletions src/midje/unprocessed.clj
Original file line number Diff line number Diff line change
Expand Up @@ -34,28 +34,25 @@
:expected (:expected-result-text-for-failures call)})

(check-result-positive [report-fn actual call]
(report-fn
(merge
(cond (extended-= actual (:expected-result call))
{:type :pass}

(chatty-checker? (:expected-result call))
(merge (fail :mock-expected-result-functional-failure actual call)
(let [chatty-result ((:expected-result call) actual)]
(if (map? chatty-result)
chatty-result
{:notes ["Midje program error. Please report."
(str "A chatty checker returned "
(pr-str chatty-result)
" instead of a map.")]})))

(fn? (:expected-result call))
(fail :mock-expected-result-functional-failure actual call)

:else (assoc (fail :mock-expected-result-failure actual call)
:expected (:expected-result call)))

(when (:formula call) {:store-report true}))))
(cond (extended-= actual (:expected-result call))
(report-fn {:type :pass})

(chatty-checker? (:expected-result call))
(report-fn (merge (fail :mock-expected-result-functional-failure actual call)
(let [chatty-result ((:expected-result call) actual)]
(if (map? chatty-result)
chatty-result
{:notes ["Midje program error. Please report."
(str "A chatty checker returned "
(pr-str chatty-result)
" instead of a map.")]}))))

(fn? (:expected-result call))
(report-fn (fail :mock-expected-result-functional-failure actual call))

:else
(report-fn (assoc (fail :mock-expected-result-failure actual call)
:expected (:expected-result call)))))

(check-result-negated [report-fn actual call]
(cond (not (extended-= actual (:expected-result call)))
Expand Down

0 comments on commit c215fb9

Please sign in to comment.