-
Couldn't load subscription status.
- Fork 128
Lein midje basics
First install lein-midje in your .lein/profiles.clj file:
{:user {:plugins [[lein-midje "3.0.0"]]}}To check everything:
% lein midjeThat checks all facts and clojure.test tests in your project's :test-paths and :source-paths. (Midje users sometimes add facts to their source as documentation.) You can also name one or more specific namespaces:
% lein midje implementation.t-line-number-reporting user.checkers.t-collectionYou can also use * to abbreviate multiple namespaces:
% lein midje implementation.emission.*Note that * names a whole namespace subtree. That is, the previous command will check both implementation.emission.t-api and implementation.emission.plugins.t-default.
lein midje checks both clojure.test tests and Midje facts. It shows output like this:
The exit status is the count of clojure.test and Midje failures (up to a maximum of 255). That is, you can check for batch command success or failure in the usual Unixey way.
Lein-midje can also be used to autotest. In that mode, it watches for file changes and reloads affected files (typically rechecking facts). Here's an example:

