Closed
Description
Expected behavior
cider-test-run-test
should run the test at point, even if it is not directly declared in the Emacs buffer with deftest
.
You might use a convenience macro which macroexpands into a deftest
form as a means of following Stuart Sierra's advice to avoid clojure.test
's fixtures mechanism, for example.
Actual behavior
"No test at point"
Steps to reproduce the problem
(ns fancy-test
(:require [clojure.test :refer :all]))
(defn- do-setup []
(println "Expensive resource setup"))
(defmacro deffancytest [sym & body]
`(deftest ~sym
(do-setup)
~@body))
(deffancytest fancytest
(is (= 1 1)))
Invoke cider-test-run-test
with the point in fancytest
and you'll get "No test at point" in the minibuffer.
Environment & Version information
CIDER version information
;; CIDER 0.12.0 (Seattle), nREPL 0.2.12
;; Clojure 1.8.0, Java 1.8.0_40
Lein/Boot version
boot 2.5.5
Emacs version
24.4.1
Operating system
OS X 10.11