Skip to content

Commit b55b537

Browse files
slipsetErik Assum
authored and
Erik Assum
committed
Allow sut alias to be customized
fixes clojure-emacs#312
1 parent 531a09f commit b55b537

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

clj-refactor.el

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,11 @@ won't run if there is a broken namespace in the project."
211211
:group 'cljr
212212
:type 'string)
213213

214+
(defcustom cljr-clojure-test-namespace-under-test-alias "sut"
215+
"The package alias to use for the namespace under test."
216+
:group 'cljr
217+
:type 'string)
218+
214219
(defcustom cljr-inject-dependencies-at-jack-in t
215220
"When nil, do not inject repl dependencies (most likely nREPL middlewares) at `cider-jack-in' time."
216221
:group 'cljr
@@ -1017,7 +1022,8 @@ If CLJS? is T we insert in the cljs part of the ns declaration."
10171022
(source-ns (cljr--find-source-ns-of-test-ns ns (buffer-file-name))))
10181023
(cljr--insert-in-ns ":require")
10191024
(when source-ns
1020-
(insert "[" source-ns " :as sut]"))
1025+
(insert "[" source-ns " :as "
1026+
cljr-clojure-test-namespace-under-test-alias "]"))
10211027
(cljr--insert-in-ns ":require")
10221028
(insert (cond
10231029
((cljr--project-depends-on-p "midje")

0 commit comments

Comments
 (0)