From 41c472b94245a40a26f6f7eac432ba3793624be5 Mon Sep 17 00:00:00 2001 From: Michael Campagnaro Date: Sun, 29 Nov 2015 16:24:07 -0500 Subject: [PATCH] Remove vim bindings for Ruby tests --- vimrc | 59 ----------------------------------------------------------- 1 file changed, 59 deletions(-) diff --git a/vimrc b/vimrc index fadb22e..3b291c3 100644 --- a/vimrc +++ b/vimrc @@ -326,65 +326,6 @@ endfunction :command! PromoteToLet :call PromoteToLet() :map pl :PromoteToLet - -"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -" RUNNING TESTS -"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -map t :call RunTestFile() -map T :call RunNearestTest() -map a :call RunTests('') -map c :w\|:!script/features - -function! RunTestFile(...) - if a:0 - let command_suffix = a:1 - else - let command_suffix = "" - endif - - " Run the tests for the previously-marked file. - let in_test_file = match(expand("%"), '\(.feature\|_spec.rb\)$') != -1 - if in_test_file - call SetTestFile() - elseif !exists("t:grb_test_file") - return - end - call RunTests(t:grb_test_file . command_suffix) -endfunction - -function! RunNearestTest() - let spec_line_number = line('.') - call RunTestFile(":" . spec_line_number . " -b") -endfunction - -function! SetTestFile() - " Set the spec file that tests will be run for. - let t:grb_test_file=@% -endfunction - -function! RunTests(filename) - " Write the file and run tests for the given filename - :w - :silent !echo;echo;echo;echo;echo;echo;echo;echo;echo;echo - :silent !echo;echo;echo;echo;echo;echo;echo;echo;echo;echo - :silent !echo;echo;echo;echo;echo;echo;echo;echo;echo;echo - :silent !echo;echo;echo;echo;echo;echo;echo;echo;echo;echo - :silent !echo;echo;echo;echo;echo;echo;echo;echo;echo;echo - :silent !echo;echo;echo;echo;echo;echo;echo;echo;echo;echo - if match(a:filename, '\.feature$') != -1 - exec ":!script/features " . a:filename - else - if filereadable("script/test") - exec ":!script/test " . a:filename - elseif filereadable("Gemfile") - exec ":!bundle exec rspec --color " . a:filename - else - exec ":!rspec --color " . a:filename - end - end -endfunction - - """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " MARKDOWN """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""