Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added test for in-ns dependencies

  • Loading branch information...
commit 7f8d9f9b3a44175a3d4b4d709af7d74f99180cbc 1 parent e35c606
James Reeves authored
Showing with 13 additions and 0 deletions.
  1. +13 −0 test/ns_tracker/test/core.clj
13 test/ns_tracker/test/core.clj
@@ -6,6 +6,7 @@
(deftest test-ns-tracker
(.mkdirs (file "tmp/example"))
+ (.mkdirs (file "tmp/example/internal"))
(let [modified-namespaces (ns-tracker [(file "tmp")])]
(testing "modified files are reloaded"
@@ -24,6 +25,18 @@
(spit (file "tmp/example/util.clj") '(ns example.util))
(is (= (modified-namespaces) '(example.util example.core))))
+ (testing "can handle in-ns forms"
+ (Thread/sleep 1000)
+ (spit (file "tmp/example/internal/util.clj") '(in-ns example.util))
+ (spit (file "tmp/example/util.clj")
+ (pr-str '(ns example.util) '(load "example/internal/util")))
+ (spit (file "tmp/example/core.clj")
+ '(ns example.core (:use example.util)))
+ (modified-namespaces)
+ (Thread/sleep 1000)
+ (spit (file "tmp/example/internal/util.clj") '(in-ns example.util))
+ (is (= (modified-namespaces) '(example.util example.core))))
(testing "namespaces are returned in an order suited for reloading"
(Thread/sleep 1000)
(spit (file "tmp/example/a.clj") '(ns example.a))
Please sign in to comment.
Something went wrong with that request. Please try again.