Print expected and actual values even when there is no diff.

Issue #2.
This commit is contained in:
Paul Stadig 2015-02-21 09:03:16 -05:00
parent fbe7cb90dd
commit a9369c00ca
2 changed files with 5 additions and 3 deletions

View file

@ -36,8 +36,7 @@
(print " actual: ")
(pp/pprint actual))]
(if (seq diffs)
(doseq [[actual [a b]] diffs
:when (or a b)]
(doseq [[actual [a b]] diffs]
(print-expected actual)
(print " diff:")
(if a

View file

@ -2,9 +2,12 @@
(:use [clojure.test]))
(defrecord ARecord [foo])
(defrecord BRecord [foo])
(deftest t-records
(testing "these should not print as plain maps"
(is (= (->ARecord :foo) (->ARecord :bar))))
(testing "there should be a diff here"
(is (= (->ARecord :foo) {:foo :foo}))))
(is (= (->ARecord :foo) {:foo :foo})))
(testing "and here"
(is (= (->ARecord :foo) (->BRecord :foo)))))