Firstly remove rspec/autorun
from spec helper (It runs tests twice -_-)
gem install zeus
zeus start
Add these to vimrc
Bundle 'thoughtbot/vim-rspec'
Bundle 'tpope/vim-dispatch'
let g:rspec_command = "compiler rspec | set makeprg=zeus | Make rspec {spec}"
map <Leader>l :call RunNearestSpec()<CR> # Run current line
map <leader>t :call RunCurrentSpecFile()<CR> # Run current spec. It also remembers last spec run when not on spec file
You can also use these commands to start quicker:
- zeus c
- zeus s
- zeus rake