summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md5
-rw-r--r--cider-test.el7
2 files changed, 10 insertions, 2 deletions
diff --git a/README.md b/README.md
index a7e47874..f4fba2b9 100644
--- a/README.md
+++ b/README.md
@@ -356,6 +356,11 @@ helpful for identifying each host.
Note that the history is written to the file when you kill the REPL
buffer (which includes invoking `cider-quit`) or you quit Emacs.
+* If your tests are not following the `some.ns-test` naming convention you can
+customize the variable `cider-test-infer-test-ns`. It should be bound to a
+function that takes the current ns and returns the matching test ns (which may
+be the same as the current ns).
+
### Minibuffer completion
Out-of-the box `CIDER` uses the standard `completing-read` Emacs mechanism. While it's not
diff --git a/cider-test.el b/cider-test.el
index 11a65368..3c5d5b44 100644
--- a/cider-test.el
+++ b/cider-test.el
@@ -380,10 +380,13 @@ With the actual value, the outermost '(not ...)' s-expression is removed."
;; its corresponding test namespace. To provide this, we need to map the
;; relationship between those namespaces.
-(defvar cider-test-infer-test-ns 'cider-test-default-test-ns-fn
+(defcustom cider-test-infer-test-ns 'cider-test-default-test-ns-fn
"Function to infer the test namespace for NS.
The default implementation uses the simple Leiningen convention of appending
-'-test' to the namespace name.")
+'-test' to the namespace name."
+ :type 'symbol
+ :group 'cider-test
+ :package-version '(cider . "0.7.0"))
(defun cider-test-default-test-ns-fn (ns)
"For a NS, return the test namespace, which may be the argument itself.