Last active
May 28, 2018 15:15
-
-
Save Integralist/8115457 to your computer and use it in GitHub Desktop.
Shortcut Vim mappings for running RSpec and Cucumber tests
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Running Tests... | |
" See also <https://gist.github.com/8114940> | |
" Run currently open RSpec test file | |
map <Leader>rf :w<cr>:!rspec % --format nested<cr> | |
" Run current RSpec test | |
" RSpec is clever enough to work out test to run if cursor is on any line within the test | |
map <Leader>rl :w<cr>:exe "!rspec %" . ":" . line(".")<cr> | |
" Run all RSpec tests | |
map <Leader>rt :w<cr>:!rspec --format nested<cr> | |
" Run currently open cucumber feature file | |
map <Leader>cf :w<cr>:!cucumber %<cr> | |
" Run current cucumber scenario | |
map <Leader>cl :w<cr>:exe "!cucumber %" . ":" . line(".")<cr> | |
" Run all cucumber feature files | |
map <Leader>ct :w<cr>:!cucumber<cr> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Cool, thanks, man!