Skip to content

What's new in midje 1.5

marick edited this page Mar 1, 2013 · 20 revisions
  • Midje has configuration files to control its behavior. Different configuration files can be selected from lein midje. That's useful for things like build servers.

  • There is now a plugin interface that allows you to customize reporting. This is also useful for working with build servers.

  • The verbosity of Midje output can be controlled with print levels.

  • There's been a heavy emphasis on in-repl documentation. There are various doc arguments that summarize groups of command or general concepts. A guide command makes it easy to jump from the repl to the user manual (wiki).

  • The user manual has also been heavily rewritten.

  • Facts can now have metadata. It can be used to pick a subset of facts to be checked, whether in the repl or via lein midje.

  • There is an experimental version of generative testing ("quickcheck"), due to Alex Baranosky.

  • Previously, loading facts checked them, then discarded them. They are now preserved in the compendium.

    • If you're fond of working in the repl, there are a variety of tools to let you load facts, recheck them, delete them from the compendium, and so on. These are intended to support both in-repl use and use by smart editors.
       
  • You can autotest in the repl, rather than just from lein midje. (An autotester tracks changes in files and retests as needed.) The in-repl version does not interfere (much) with your use of the repl.

  • Midje produces more, and more helpful, errors.

  • The syntax of background forms has been made less picky. People just starting out with Midje should be able to avoid the whole baroqueness of background forms by using [[with-state-changes|setup and teardown]] and [[prerequisites|establishing fact-wide prerequisites]].

  • I've started to evolve the codebase to attract new committers.

    The Midje codebase suffered from its history. It was my first Clojure project, developed to scratch a particular itch, and some early mistakes lingered way past May 23, 2010. (For example, some of the early names were – and remained – horrible.)

    Moreover, Midje has had an interesting evolution. It started as something that focused enormously on the macroexpansion of a particular syntax. It became a more normal program that works with runtime state. However the macroexpansion/parsing focus remained smeared all through the codebase, making it forbidding for new committers. The plugin interface for reporting is the first step toward making Midje properly modular, with the subtle code nicely encapsulated. More remains to be done.

  • There are a number of minor (and, I hope, invisible) usability improvements.

  • Clojure 1.2.X is no longer supported.

  • Much of what lein midje did was moved into Midje proper, made available through the repl as well as through the command line, and generally improved.

Clone this wiki locally