I've been running my app's tests through `lein test` (most often for
specific namespaces) for a long time now, but after reading Leiningen's
recommendation<https://github.com/technomancy/leiningen/blob/stable/doc/TUTORIAL.md#tests>to
run them from the REPL I decided I should figure out how to make this
happen.

I've heard a few options on this subject, and would love to know what you
yourselves use. A couple I stumbled upon were:


   - In your favorite editor with nrepl/cider, do some work in the ns
   you're testing, reload it from within the editor, then switch to the
   testing ns and run (clojure.test/run-tests) from within. Then when you're
   done with your work, run a `lein test` just in case your state while
   nrepling in was corrupted or another ns was affected etc.
   - Use your favorite editor with nrepl/cider to work on the app's ns, but
   then switch to a repl started within `lein repl` in which you're only
   running tests. This potentially helps with a slightly cleaner state. (I'm
   not clear how you'd reload the app's ns without the hassle of having to
   always (require) the right set of changed nses)
   - In a new `lein repl`, use bultitude, load all test nses, use
   clojure.test/run-all-tests with the right regex. Like `lein repl`, minus
   having to spin up a new JVM every time.

I'm currently playing around with the first approach. I'd love to know if I
missed something much more effective, or if I can make this a bit simpler
and less manual. Tips would be greatly welcome.

Cheers!

-- 
Alexandr Kurilin
206.687.8740 | @alex_kurilin <https://twitter.com/alex_kurilin> |
blog<http://www.kurilin.net>

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to