I'm sure this is just me being dumb about bindings but I've been
writing tests and I saw in the docs it says you can cause deftest and
with-test to not generate tests if you bind *load-tests* to false -
for production.
I can't quite get my head around how I would bind that variable in a
way that
Hi Sean,
As far as I know, that feature never saw much use. Most people like to
keep their test and main sources separate, and build tools assume
this.
To bind *load-tests* during compilation, you would need to control
your own build process. Basically, you would have to launch Clojure
and
Thanx Stuart. I had a feeling it might require that. I've mostly been
using lein and keeping the tests separate but when I saw that in the
docs I thought I'd try it because it would be kinda convenient inside
CCW / Eclipse while developing.
On Sunday, August 29, 2010, Stuart Sierra
So I thought I'd see if I could use tests in source code and add a
hook to lein to bind *load-tests* to false around the compile but I'm
missing something...
Here's my hook:
(ns leiningen.notests)
(use 'robert.hooke)
(defn no-tests [task args]
(binding [clojure.test/*load-tests* false]
On Sun, Aug 29, 2010 at 5:27 PM, Sean Corfield seancorfi...@gmail.com wrote:
So I thought I'd see if I could use tests in source code and add a
hook to lein to bind *load-tests* to false around the compile but I'm
missing something...
(defn no-tests [task args]
(binding