Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Run expecations when source or test files change
Shell Clojure


Leiningen plug-in for automatically running expectations whenever your Clojure project's source changes.


Here is what using it looks like.

$ lein autoexpect
*************** Running tests ***************
Ran 3 tests containing 3 assertions in 16 msecs
0 failures, 0 errors.

Your terminal will just stay like that. Every half second autoexpect polls the file system to see if anything has changed. When there is a change your code is tested again.

If you want to receive notifications using growl, then run lein autoexpect :growl. This has been tested with modern versions of Growl for OS X, Linux, and Windows.

If you would like to use the OS X notification center, use lein autoexpect :notify. This requires terminal-notifier, which you can install using brew install terminal-notifier.

Latest version

The version in the image below is the latest (and hopefully greatest) released version of lein-autoexpect. It is what version number should be used in any of the verion numbers specified lower than this point in the README.

Latest version

Leiningen 2.0

Add [lein-autoexpect "1.7.0"] to your ~/.lein/profiles.clj as follows:

{:user {:plugins [[lein-autoexpect "1.7.0"]]}}

Alternatively add to your :plugins vector in your project.clj file.

(defproject sample
  :dependencies [[org.clojure/clojure "1.7.0"]]
  :profile {:dev {:dependencies [[expectations "2.0.9"]]}}
  :plugins [[lein-autoexpect "1.7.0"]])

Leiningen 1.7 and older

Add [lein-autoexpect "1.7.0"] to your project.clj file under :dev-dependencies or install as a Leiningen plugin (lein plugin install lein-autoexpect 1.7.0). Run using lein autoexpect


autoexpect should work with any version of expectations. If there is an issue please report it. I've tested it with versions 1.1.0, 1.3.[023678], and 1.4.*, and 2.0.9.

Because of tools.namespace changes lein-autoexpect requires that your project use Clojure >= 1.3.0. If your project also depends on a version of tools.namespace < 0.2.1 you may see occasional exceptions.


Copyright (C) 2011-2014 Jake McCrary

Distributed under the Eclipse Public License, the same as Clojure.

Something went wrong with that request. Please try again.