Run RSpec examples from Vim
" Run RSpec examples.
" Loosely inspired by: https://gist.github.com/1062296
function! RunSpec(args)
let cmd = "bundle exec rspec " . a:args . " " . @%
execute ":! echo " . cmd . " && " . cmd
endfunction
map <silent> <leader>r :call RunSpec("")<CR>
map <silent> <leader>re :call RunSpec("-fn -l " . line('.'))<CR>
For this and other Vim configurations, please check my dotfiles.
Written by Luca Guidi
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#