Skip to content

Commit 617c629

Browse files
Nick Robinsontpope
authored andcommitted
Change spec default template to require rails_helper instead of spec_helper (tpope#476)
1 parent 09ffc84 commit 617c629

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

autoload/rails.vim

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3000,8 +3000,9 @@ endfunction
30003000
function! s:specEdit(cmd,...) abort
30013001
let describe = s:sub(s:sub(rails#camelize(a:0 ? a:1 : ''), '^[^:]*::', ''), '!.*', '')
30023002
return rails#buffer().open_command(a:cmd, a:0 ? a:1 : '', 'spec', [
3003-
\ {'pattern': 'spec/*_spec.rb', 'template': "require 'spec_helper'\n\ndescribe ".describe." do\nend"},
3004-
\ {'pattern': 'spec/spec_helper.rb'}])
3003+
\ {'pattern': 'spec/*_spec.rb', 'template': "require 'rails_helper'\n\ndescribe ".describe." do\nend"},
3004+
\ {'pattern': 'spec/spec_helper.rb'},
3005+
\ {'pattern': 'spec/rails_helper.rb'}])
30053006
endfunction
30063007

30073008
" }}}1

0 commit comments

Comments
 (0)