vim-turbux
vim-turbux copied to clipboard
Focussed MiniTest not working with `g:turbux_test_type='minitest'` or when `g:turbux_test_type` not set
I used to have the following in my ~/.vimrc
:
autocmd BufNewFile,BufRead {*_test.rb} let g:turbux_test_type='minitest'
autocmd BufNewFile,BufRead {*_spec.rb} let g:turbux_test_type='rspec'
But running focused tests with MiniTest would always fail since it would append the line number (e.g. ruby -Itest mytest.rb:44
) and fails to find the named test (it should use -n "test_name").
I tracked this down to a line that checks the g:turbux_test_type != 'minitest'
. So I removed setting g:turbux_test_type
altogerther, but then running focused tests I got this:

Since the var is not set :(
Basically, I've resorted to having this in my vimrc for now and things are working again (for both minitest, rspec, cucumber):
let g:turbux_test_type='x'
I also noticed that g:turbux_test_type
is not mentioned anywhere else in the plugin code or the docs, so perhaps this is legacy (or undocumented) code?