testing

Testing tools, testing philosophy & methodology...
dharrigan 2019-05-06T10:52:28.036400Z

So, starting to get to grips with tests and already hitting my first issue. I have a directory structure thus:

dharrigan 2019-05-06T10:52:36.036600Z

./test/dharrigan/palindrome_test.clj
./src/dharrigan/palindrome.clj

dharrigan 2019-05-06T10:52:49.037Z

a deps.edn, like this:

dharrigan 2019-05-06T10:52:50.037200Z

{:deps {org.clojure/clojure {:mvn/version "1.10.0"}}
 :aliases
 {:test {:extra-paths ["test"]}}}

dharrigan 2019-05-06T10:53:34.037800Z

but when I run eastwood, it complains:

dharrigan 2019-05-06T10:53:36.038Z

Unknown error: java.lang.Exception: No file found for namespace dharrigan.palindrome-test
java.lang.Exception: No file found for namespace dharrigan.palindrome-test

dharrigan 2019-05-06T10:54:46.038600Z

In Vim, when I connect (vim-fireplace), it won't eval/reload the namespace, shows this error...

dharrigan 2019-05-06T10:54:49.039Z

Execution error (FileNotFoundException) at user/eval6866 (REPL:1).
Could not locate dharrigan/palindrome_test__init.class, dharrigan/palindrome_test.clj or dharrigan/palindrome_test.cljc on classpath. Plea
se check that namespaces with dashes use underscores in the Clojure file name.

dharrigan 2019-05-06T10:55:45.040100Z

:face_with_raised_eyebrow:

dharrigan 2019-05-06T10:56:24.040400Z

Any help bod can point me in the right direction?

donaldball 2019-05-06T11:48:05.040600Z

How are you running eastwood?

dharrigan 2019-05-06T11:48:26.040800Z

clojure -A:eastwood

donaldball 2019-05-06T12:46:59.041900Z

I suspect you’ll either need to add :extra-paths to the :eastwood alias or use both aliases, which I think would be clojure -A:eastwood:test

dharrigan 2019-05-06T15:25:44.042100Z

Thanks, will examine