On Mon, Jan 7, 2013 at 11:50 PM, Eric MacAdie <emaca...@gmail.com> wrote: > Is there a common unit testing framework for Clojure? I did some googling, > put all the results were a couple of years old.
As others have noted separately, Clojure has clojure.test built-in which is fairly straightforward assertion-based: (deftest (is (= :expected (actual-expression)))) At World Singles we use that for our WebDriver-based tests, but we use Jay Fields' Expectations which has the benefit of simpler behavioral assertions but runs all tests at JVM shutdown (which is generally great, but doesn't work well with browser session testing): (expect :expected (actual-expression)) ;; or (give (actual-expression) (expect first :a second :b)) I've just started looking at Midje for another project and might update our WebDriver tests to use that instead of clojure.test since Midje provides a very (very!) rich vocabulary for writing tests. A simple test would be: (fact (actual-expression) => :expected) Both Expectations and Midje have plugins for Leiningen that will watch your source / tests for changes and automatically run your test suite. Both of them also have modes for Emacs that provide a very slick workflow there. I like Expectations for its clean, simple approach. I'm growing to like Midje for its sophistication. -- Sean A Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/ World Singles, LLC. -- http://worldsingles.com/ "Perfection is the enemy of the good." -- Gustave Flaubert, French realist novelist (1821-1880) -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en