Running Specs From Vim

August 5, 2013 dancroak vim rspec Test driven development thrives on a tight feedback loop. However, switching from the editor to the shell to manually run specs is inefficient. Tools such as autotest and guard run specs whenever a file gets saved. Although an improvement over a manual workflow, those approaches often run the suite when not needed and run too many or too few specs. Enter vim-rspec , a lightweight vim plugin that runs specs directly from within vim with the press of a key. It exposes methods such as RunNearestSpec() , RunCurrentSpecFile() , and RunLastSpec() , which can be bound to a key mapping of your choice. In thoughtbot/dotfiles , we bind those methods to <Leader>s , <Leader>t , and <Leader>l . Cursor over any line within an RSpec spec like this: describe RecipientInterceptor do it 'overrides to/cc/bcc fields' do Mail.register_interceptor RecipientInte...