This is a Vim plugin that adds a test runner to
vim-test specifically for
github/github
.
This allows your cursor to be inside of a test definition, and it will figure out the appropriate line number to run.
Install vim-test
and this plugin:
Plug 'janko-m/vim-test'
Plug 'bswinnerton/vim-test-github'
Add the following after the test definition from above:
let test#runners = {'Ruby': ['GitHub']}
Vim-test supports a number of
strategies to asynchronously
run tests from Vim. I like vimux, to use it
you can set the following in your ~/.vimrc
:
let test#strategy = "vimux"
I'd also recommend making it easy to run vim-test from a key sequence:
nmap <silent> <leader>t :TestNearest<CR>
nmap <silent> <leader>T :TestFile<CR>
nmap <silent> <leader>a :TestSuite<CR>
nmap <silent> <leader>l :TestLast<CR>
- Currently there is only support for minitest "spec" syntax