-
Notifications
You must be signed in to change notification settings - Fork 129
What's new in midje 1.6
Midje 1.6 is currently being developed. See the main page for the most recent version number.
-
autotest can take file arguments (Joseph Wilk)
The
:dirs
option is deprecated, replaced by:files
or:file
. The arguments can be files or directories.(autotest :file "test/midje/t_repl.clj") (autotest :files "test/midje/t_repl.clj" "src/midje")
-
a progress-meter style of reporting (Joseph Wilk)
By setting the
:emitter
config option to'midje.emission.plugins.progress
, you get "dot style" output:.........FFFF.FFFF.FFF..FP...................
Periods mean success, "F" means failure, and "P" represents a future fact.
After the tests are run, the normal failure messages and summary are printed.
-
Optional arguments in prerequisites (Joseph Wilk)
If you don't care about arguments at the end of the argument list, you can do this:
(fact (find-letter) => ..letter-result.. (provided (letter "x" & anything) => ..letter-result..))
The value after the
&
is compared to the remaining arguments using extended equality. Therefore, you can do this:(fact (find-letter) => ..letter-result.. (provided (letter & (contains ["x" "y"])) => ..letter-result..))
-
Setting colorize via .midje.clj config (Joseph Wilk)
You can turn off color used in the terminal output by setting "colorize" in your .midje.clj config. You can also still use the ENV variable COLORIZE=false or COLORIZE=true. The environment always takes precedent.
(change-defaults :colorize false)