Organizing test hierarchy in clojure project

Posted by Sergey on Stack Overflow See other posts from Stack Overflow or by Sergey
Published on 2012-06-06T04:12:14Z Indexed on 2012/06/06 4:40 UTC
Read the original article Hit count: 155

Filed under:
|

There are two directories in a clojure project - src/ and test/. There's a file my_methods.clj in the src/calc/ directory which starts with

(ns calc.my_methods...).

I want to create a test file for it in test directory - test/my_methods-test.clj

(ns test.my_methods-test
  (:require [calc.my_methods])
  (:use clojure.test))

In the $CLASSPATH there are both project root directory and src/ directory. But the exception is still

"Could not locate calc/my_methods__init.class or calc/my_methods.clj on classpath". What is the problem with requiring it in the test file?

echo $CLASSPATH gives this:

~/project:~/project/src

© Stack Overflow or respective owner

Related posts about testing

Related posts about clojure