It is often that we create a number of tests using fact macro. facts macro allows us to group related tests together. The first argument is a description of a group of tests, as follows:
(facts "nil or blank strings are invalid values"
(fact (non-blank? nil) => false)
(fact (non-blank? "") => false))
(facts "alpha-numeric are possible values"
(fact (non-blank? "Some text") => true)
(fact (non-blank? "1234") => true))
The auto-test running in repl gives us the following information:
=================================================================
Loading (testing-example.midje-tests)
nil
All checks (5) succeeded.