testing - Organizing test hierarchy in clojure project -
there 2 directories in clojure project - src/ , test/. there's file my_methods.clj in src/calc/ directory starts
(ns calc.my_methods...).
i want create test file in test directory - test/my_methods-test.clj
(ns test.my_methods-test (:require [calc.my_methods]) (:use clojure.test)) in $classpath there both project root directory , src/ directory. exception still
"could not locate calc/my_methods__init.class or calc/my_methods.clj on classpath". problem requiring in test file?
echo $classpath gives this:
~/project:~/project/src
first, i'd suggest using leiningen manage classpath you. second, find ~ character stand in home directory never works in classpath context - have specify absolute path, no aliasing (e.g. /users/colin/path/to/project). third, it's conventional have src , test on classpath, not root level of project.
Comments
Post a Comment