Closed giorgio-v closed 10 years ago
I haven't had a chance to try it but I think the actual problem is that lein-test-refresh
only reruns tests found under the :test-paths
entry in the project.clj file. It used to attempt to run tests in the entire project but the noise of running tests in :source-paths
was annoying.
Can you try adding your source directory to the :test-paths
entry? If that works is that acceptable?
I’ve tried adding the source directory, but it’s the same.
Had some time to take a look at this and was able to get lein test-refresh
to run tests attached to functions using clojure.test/with-test
.
Below is my project.clj. This seemed to be enough to get it working. Was able to make changes to my code and see attached tests fail and succeed on file changes.
(defproject test-in-code "0.1.0-SNAPSHOT"
:test-paths ["src" "test"]
:dependencies [[org.clojure/clojure "1.6.0"]]
:profiles {:dev {:plugins [[com.jakemccrary/lein-test-refresh "0.5.1"]]}})
Ah you’re right. I was mislead by having tests in both paths.
Would it be possible to extend
lein-test-refresh
to support theclojure.test/with-test
macro?Basically, I’d like to auto run tests defined in this way:
Right now, these are not loaded by
lein-test-refresh
because they are attached as meta data to the functions.