From a9369c00cadffbae94fa1081a4214082336b7a1f Mon Sep 17 00:00:00 2001 From: Paul Stadig Date: Sat, 21 Feb 2015 09:03:16 -0500 Subject: [PATCH] Print expected and actual values even when there is no diff. Issue #2. --- src/pjstadig/humane_test_output.clj | 3 +-- test/pjstadig/humane_test_output/records_test.clj | 5 ++++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/pjstadig/humane_test_output.clj b/src/pjstadig/humane_test_output.clj index 4e134a8..3e38e9f 100644 --- a/src/pjstadig/humane_test_output.clj +++ b/src/pjstadig/humane_test_output.clj @@ -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 diff --git a/test/pjstadig/humane_test_output/records_test.clj b/test/pjstadig/humane_test_output/records_test.clj index 075fe93..bab3aea 100644 --- a/test/pjstadig/humane_test_output/records_test.clj +++ b/test/pjstadig/humane_test_output/records_test.clj @@ -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)))))