Run test under cursor with fixtures applied

Use `test-vars` instead of `test-var` so the test runs with the fixtures
applied. That's the expected behavior when running a test. It's also
what's being done when multiple tests are matched.
This commit is contained in:
Nicolas Berger 2015-07-31 14:53:10 -03:00
parent 9f7b1844cf
commit b50e74f342

View File

@ -1618,7 +1618,7 @@ function! s:RunTests(bang, count, ...) abort
let vars = filter(copy(reqs), 'v:val =~# "/"') let vars = filter(copy(reqs), 'v:val =~# "/"')
let nses = filter(copy(reqs), 'v:val !~# "/"') let nses = filter(copy(reqs), 'v:val !~# "/"')
if len(vars) == 1 if len(vars) == 1
call add(expr, '(clojure.test/test-var #' . vars[0] . ')') call add(expr, '(clojure.test/test-vars [#' . vars[0] . '])')
elseif !empty(vars) elseif !empty(vars)
call add(expr, join(['(clojure.test/test-vars'] + map(vars, '"#".v:val'), ' ').')') call add(expr, join(['(clojure.test/test-vars'] + map(vars, '"#".v:val'), ' ').')')
endif endif