Skip to content

Instantly share code, notes, and snippets.

@biscuitvile
Created February 11, 2015 18:01
Show Gist options
  • Save biscuitvile/c07cae84c2dc584d31bb to your computer and use it in GitHub Desktop.
Save biscuitvile/c07cae84c2dc584d31bb to your computer and use it in GitHub Desktop.
" RSpec Expect To
imap <leader>et expect().to<ESC>F(a
" RSpec Expect To Equal
imap <leader>ete expect().to eql<ESC>F(a
" RSpec Expect To Include
imap <leader>eti expect().to include<ESC>F(a
" RSpec Expect To Be
imap <leader>etb expect().to be_<ESC>F(a
" Convert minitest stub to RSpec allow
nmap <leader>sta V:s/stub/allow/g<CR>0f)llito receive(:<ESC>/ <CR>i)<ESC>
" Convert minitest mock to RSpec expect
nmap <leader>mte V:s/mock/expect/g<CR>0f)llito receive(:<ESC>/ <CR>i)<ESC>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment