Skip to content

Instantly share code, notes, and snippets.

@emorikawa
Created July 30, 2014 18:37
Show Gist options
  • Save emorikawa/a091dfded1643ef86299 to your computer and use it in GitHub Desktop.
Save emorikawa/a091dfded1643ef86299 to your computer and use it in GitHub Desktop.
Convert RSpec `should` syntax to newer `expect` syntax
command! ShouldToExpect %s/\(^\s\+\)\(.\+\)\.should \(.\+\)/\1expect(\2).to \3/
@emorikawa
Copy link
Author

Run the regex by itself or enter the line above into your .vimrc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment