Clone this wiki locally
These old pages applied to older versions of Midje. They’re retained mainly to avoid dead links. Some of the pages are shared with the newest Midje version.
- Two words you need to know: The Midje terminology
- Facts and prerequisites: How you describe claims about your code.
- Extended equality: `=` extended for regular expressions, functions, etc.
- Checkers: Prepackaged functions that perform common checks.
- More about facts
- More about checkers
- Checkers for collections and strings: Containment checking that allows gaps, arbitrary ordering, nested checkers, etc.
- Compound checkers: Checkers that combine other checkers.
- Writing your own checkers: It’s simple.
- Chatty checkers: Checkers that explain more about a failure.
- Checkers within prerequisites They’re treated slightly differently than the normal case.
- Metaconstants: A notation that avoids confusion between what’s essential about data and what’s accidental.
- More about prerequisites
- Folded prerequisites: Allowing prerequisites like `(f (g 1)) => 2`.
- Background prerequisites: Prerequisites that apply to more than one fact.
- Partial prerequisites: Undescribed function calls can go to the real function.
- Streaming prerequisites: Each call to a prerequisite returns a different value.
- Prerequisites that throw exceptions: The `=throws=>` arrow.
- Specifying call counts: Saying the function-under-test calls another function N times.
- Checkers within prerequisites: They’re treated slightly differently than the normal case.
- Prerequisites and protocols: Extra work is required to override protocol functions in facts.
- Setup, teardown, and state: Executing code before, after, and around multiple facts or individual checks.
Integration and migration
- Migrating from clojure.test
- Production mode: Preventing Midje code from being compiled into production code.
- Colorizing: Highlight failing and future facts.
- Midje-mode: Emacs mode for using Midje with a REPL.
- clojure-jump-to-file: Jump to a line of Clojure code from any Emacs buffer (usually a shell buffer).
- Cascalog functions
- An introduction to Midje for clojure.test users
- An example showing top-down testing using metaconstants (alternate download)
- An Emacs minor mode for Midje
- Emacs code to jump to a particular location in a Clojure file
- Help wanted
- Error message improvements
- Syntax errors that will not be fixed
- Why is it called "Midje"?
- Thoughts about replacing background