diff --git a/README.md b/README.md index d84ab18..d5e9e5b 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,12 @@ light weight replacement for native interop (JNI, JNA, etc.). - When developing pods, this library can be used to test them on the JVM. +## Run tests + +``` +$ script/test +``` + ## License Copyright © 2020 Michiel Borkent diff --git a/src/babashka/pods/jvm.clj b/src/babashka/pods/jvm.clj index aeb621f..8e8f9c1 100644 --- a/src/babashka/pods/jvm.clj +++ b/src/babashka/pods/jvm.clj @@ -9,5 +9,6 @@ (doseq [[ns-sym v] namespaces] (load-string (format "(ns %s)" ns-sym)) (doseq [[var-sym v] v] + (ns-unmap ns-sym var-sym) (intern ns-sym var-sym v))) (future (impl/processor pod))))) diff --git a/test/babashka/pods/jvm_test.clj b/test/babashka/pods/jvm_test.clj index 9c77a1e..9d69f28 100644 --- a/test/babashka/pods/jvm_test.clj +++ b/test/babashka/pods/jvm_test.clj @@ -16,4 +16,4 @@ [1 2 3 4 5 6 7 8 9] "Illegal arguments / {:args (1 2 3)}"] ret)) (is (= "(\"hello\" \"print\" \"this\" \"debugging\" \"message\")\n" (str out))) - (is (= "WARNING: assoc already refers to: #'clojure.core/assoc in namespace: pod.test-pod, being replaced by: #'pod.test-pod/assoc\nWARNING: print already refers to: #'clojure.core/print in namespace: pod.test-pod, being replaced by: #'pod.test-pod/print\n(\"hello\" \"print\" \"this\" \"error\")\n" (str err))))) + (is (= "(\"hello\" \"print\" \"this\" \"error\")\n" (str err)))))