How do I add unit tests to a Leiningen project?
At the top level make a test/ directory, and then create some file, say mytests.clj. Here's a sample (caveat: I didn't actually compile this, but simplified an existing test):
(ns mytests
(:use clojure.test))
(defn myfixture [block]
(do
(println "before test")
(block)
(println "after test")))
(use-fixtures :each myfixture)
(deftest mytest
(is (= 2 (+ 1 1))))