Say you have a namespace a that needs to be tested: 1 (ns a) (defn ^{:private true} foo [:] 42) Using Clojure's clojure.test libs you might think it would be as simple as the following: (ns b (:use [clojure.test :only [deftest is]])) (deftest test-foo (is (= 42 (a/foo)))) ; java.lang.IllegalStateException: var: #'a/foo is not public [...:]
Published on September 03, 2010 13:25