Actually i discovered that this ns declaration is wrong. I get an error when running tests from lein at the shell.
[geminiani:~/Repos/clojure-rte] jimka% lein test
Exception in thread "main" Syntax error compiling at (clojure_rte/bdd_test.clj:1:1).
at clojure.lang.Compiler.load(Compiler.java:7647)
at clojure.lang.RT.loadResourceScript(RT.java:381)
at clojure.lang.RT.loadResourceScript(RT.java:372)
at clojure.lang.RT.load(RT.java:463)
at clojure.lang.RT.load(RT.java:428)
at clojure.core$load$fn__6824.invoke(core.clj:6126)
at clojure.core$load.invokeStatic(core.clj:6125)
...
Caused by: java.lang.ClassNotFoundException: clojure_rte.bdd.Bdd
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)
at clojure.lang.DynamicClassLoader.findClass(DynamicClassLoader.java:69)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
...
The problem seems to be that we cannot :import Bdd before :require clojure-rte.bdd. I.e. first :require the package that defines it, then :import the class name.
I’ve changed the name space declaration to the following and the file seems to load properly.
(ns clojure-rte.bdd-test
(:require [clojure-rte.bdd :refer :all ]
[clojure.pprint :refer [cl-format]]
[clojure.test :refer :all])
;; this imports the name of the Bdd record, which is otherwise not imported by :require
(:import [clojure_rte.bdd Bdd]))