java.io.FileNotFoundException running autotest

78 views
Skip to first unread message

boz

unread,
Feb 8, 2013, 1:03:38 AM2/8/13
to spe...@googlegroups.com
Hi, 

I'm basically a Clojure nube with years of Java TDD / BDD experience. Just getting my toes wet with speclj 2.5.0. I've got 'lein spec' to work but 'leon spec -a' keeps throwing FileNotFoundException. Looks like it's looking for the spec files under the namespace of my project instead of speclj. I've tried various forms of (:use ...) but am at a loss.

lein -version
Leiningen 2.0.0 on Java 1.7.0_13 Java HotSpot(TM) 64-Bit Server VM

--- spec file ---
(ns myapp.core-spec
  (:use [speclj.core]
        [myapp.core])
)

(describe "truthiness"
  (it "tests if true-or-false returns true"
      (should (true-or-false))))

(run-specs)

--- file under test ---
(ns myapp.core)

(defn true-or-false []
  true)

--- 'lein spec -a' output ---
----- Thu Feb 07 21:43:01 PST 2013 -------------------------------------------------------------------
took 0.12583 seconds to determine file statuses.
reloading files:
  /Users/boz/dev/clojure/myapp/spec/myapp/core_spec.clj
java.io.FileNotFoundException: Could not locate myapp/core_spec__init.class or myapp/core_spec.clj on classpath: 
    ... 15 stack levels elided ...
    at fresh.core$load_nses.invoke(core.clj:166)
    at fresh.core$doto_nses.doInvoke(core.clj:173)
    ... 1 stack levels elided ...
    at fresh.core$make_fresh.invoke(core.clj:191)
    ... 7 stack levels elided ...
    at fresh.core$make_fresh.invoke(core.clj:188)
    ... 18 stack levels elided ...

Micah Martin

unread,
Feb 8, 2013, 8:08:27 AM2/8/13
to spe...@googlegroups.com
Boz,

Good on you for getting into Clojure and using Speclj.  I'm sure you'll find both advantageous.

There's only a couple possibilities with this error.

1. Do you have "test-paths ["spec"]" in your project.clj?
2. Is your spec code in the file: myapp/core_spec.clj?

Micah

--
You received this message because you are subscribed to the Google Groups "speclj" group.
To unsubscribe from this group and stop receiving emails from it, send an email to speclj+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

boz

unread,
Feb 8, 2013, 10:28:26 AM2/8/13
to spe...@googlegroups.com
Thanks Micah! It was "test-paths ["spec"]" ... I had first done it with "test-path "spec"" and missed the 's' and '['s when getting it to go in lein2. 
:-)
Reply all
Reply to author
Forward
0 new messages