tests mixed with sources doesn't work

24 views
Skip to first unread message

Dan Pomohaci

unread,
Jun 4, 2014, 2:27:53 AM6/4/14
to mi...@googlegroups.com
Hello,

I tried in several clojure projects to mix tests with sources (is easer to develop and tests are good for documenting code). Unfortunate, at runtime all of them crush with the same error:
Exception in thread "main" java.lang.ExceptionInInitializerError
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:270)
at clojure.lang.RT.loadClassForName(RT.java:2098)
...
Caused by: java.lang.NullPointerException
at java.util.concurrent.ConcurrentHashMap.hash(ConcurrentHashMap.java:333)
at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:988)
at clojure.lang.Namespace.find(Namespace.java:188)
at clojure.core$find_ns.invoke(core.clj:3728)
at clojure.core$the_ns.invoke(core.clj:3760)
at clojure.core$ns_name.invoke(core.clj:3767)
at midje.Bootstrap$bootstrap.invoke(Bootstrap.clj:8)
at midje.sweet__init.load(Unknown Source)
at midje.sweet__init.<clinit>(Unknown Source)
 
Using
(alter-var-root #'midje.sweet/include-midje-checks (constantly false))
didn't help.

Do we have a solution for this issue, other than moving the tests  in separate files?

Thank you,
Dan
Reply all
Reply to author
Forward
0 new messages