Re: deftest and var's metadata

2014-05-27 Thread Nahuel Greco
ok, just for the record, I fixed it. Instead of (resolve 'a) you must use (ns-resolve 'test-namespace 'a), because lein test runs the tests in namespace 'userinstead of the one that defined the test (as I wrongly assumed). Also the first test for the existence of the var is wrong, I assumed resolve

deftest and var's metadata

2014-05-26 Thread Nahuel Greco
This works ok at the REPL: (def ^{:k :v} a 4) (:k (meta (resolve 'a))) ;=> evaluates to :v, ok. But the same didn't worked inside a clojure.test/deftest: (deftest mytest (def ^{:k :v} b 4) (is (= (resolve 'b) nil)) ;; passed, var is resolved ok (is (= (:k (meta (resolve 'b)))