I'm using jEdit and what I want to do is to write a file and run tests to it. I'm interested in the process of running the tests, not the files themselves.
So I wrote this simple function in File.clj
(defn abs [n]
(if (neg? n) (- n) n))
And this test in TheTest.clj
(use 'clojure.test)
(load-file "File.clj")
(deftest sample-test
(testing "abs"
(is (= 5 (abs (5))))))
(run-tests)
and then I run the file TheTest.clj
but it says:
java.io.FileNotFoundException: File.clj (The system cannot find the file specified) (TheTest.clj:49)
Can someone please tell is this is the way to do the things, and if not how to run the tests :( It's not necessary to be in jEdit, it may be in the command prompt if it should. Also I have leiningen installed and File.clj
and TheTest.clj
are in same directory. I also tried providing the whole path to the file in the load-file function but with no success.
Thank you very much, good people! :)