Quantcast
Channel: Yan Pritzker » vim
Viewing all articles
Browse latest Browse all 5

Convert rspec pending to xit with vim

$
0
0

RSpec has two ways of disabling tests: pending and xit. Except one of them is truly evil. Pending actually still runs the before block even when it’s disabled. This is bad when you have a test with a very expensive before block. Changing the pending to xit is a great strategy, but tedious. Vimscript to the rescue! The functionality is available as part of my dotfiles repo, but you can just grab the script by itself and type ,rxit to use it on a file.

For more awesomeness, check out my dotfiles repo called YADR (Yet Another Dotfiles Repo), featuring 100% clean vimrc with all custom keymapping done in well factored scripts inside vim/plugin/settings, and a list of plugins perfectly tailored for Rails development, currently in alpha preview.

The post Convert rspec pending to xit with vim appeared first on Yan Pritzker.


Viewing all articles
Browse latest Browse all 5

Trending Articles