vim-turbux icon indicating copy to clipboard operation
vim-turbux copied to clipboard

Focussed MiniTest not working with `g:turbux_test_type='minitest'` or when `g:turbux_test_type` not set

Open matthutchinson opened this issue 6 years ago • 0 comments

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:

screen shot 2018-05-09 at 09 56 21

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?

matthutchinson avatar May 09 '18 09:05 matthutchinson