-
Notifications
You must be signed in to change notification settings - Fork 129
New in 1.4
marick edited this page Apr 27, 2012
·
13 revisions
- Facts now report their doc strings. Nested facts report nested descriptions.
(facts "about arithmetic"
(fact "addition"
(+ 0 1) => 0))
;; FAIL "about arithmetic - addition" at (core.clj:18)
- Tabular facts no longer require variable names to begin with "?".
- The
throws
checker is much more flexible. -
every-checker
andsome-checker
can be used to combine other checkers while still getting helpful failure messages.
(fact 19 => (every-checker odd?
#(> (count (str %)) 11)))
- Checker synonyms:
FALSEY
,TRUTHY
, andirrelevant
(foranything
). - Chatty checkers can destructure their single argument.
- The =throws=> arrow can be used to throw exceptions.
- You can use vars as well as symbols in prerequisites.
- Better reporting of test failures.
- Better error reporting for many common test-writing mistakes.
- Everything has doc strings.
-
expose-testables
is another way to test private functions.