marick / lein-midje

Leiningen plugin for Midje
MIT License
77 stars 29 forks source link

Fixed issues with lein midje --lazytest #12

Closed sritchie closed 12 years ago

sritchie commented 12 years ago

The quoting of the form returned by make-report-fn and make-run-fn caused lazytest to fail, as lazytest requires a function (and the quote was passing in a list).

Additionally, ~*quit-after-tests* always evaluated to true within the call to lazytest, causing the program to quit immediately after the first run. This method prevents it; it would probably also work to surround the lazytest call in

(binding [*quit-after-test* false]
   ...)

but I haven't tested it.

Thanks!

sritchie commented 12 years ago

By the way, I'm using an empty project with the following project.clj:

(defproject helper "0.1.0-SNAPSHOT"
  :description "FIXME: write description"
  :dependencies [[clojure "1.3.0"]]
  :repositories {"stuart" "http://stuartsierra.com/maven2"}
  :dev-dependencies [[com.stuartsierra/lazytest "1.2.3"]
                     [midje "1.3.1"]])
AlexBaranosky commented 12 years ago

Hi Sam,

Thanks for this. It's weird to me because lazytest ran fine for me and for others, even with the '~(make-run-fn) maybe it was because I was running an older version of lazy-test? It is kind of mysterious, but I'll pull your changes anyway :)

sritchie commented 12 years ago

Thanks Alex! It's almost certainly because of Stuart Sierra's bump to 1.2.3.