The following test fails:
(ns clojure_refactoring.rename-fn-test
(:use clojure.test))
(deftest test-fn-location
(in-ns 'refactoring-test-fn-rename)
(clojure.core/refer-clojure)
(defn a [b] (inc b))
(in-ns 'clojure_refactoring.rename-fn-test)
(is (not= (find-var 'refactoring-test-fn-rename/a)
nil))
(remove-ns 'refactoring-test-fn-rename))
That is, find-var (of a var I've just created, in a namespace I've just create) returns nil. This behaviour doesn't happen at the repl, where typing out the steps of the test works just fine.
Am I doing something wrong, or is this just something that doesn't work in clojure right now?