Permalink
Browse files

Change spec default template to require rails_helper instead of spec_…

…helper (#476)
1 parent 09ffc84 commit 617c62967f2649a56f9fad75cdac5ac7327e972c @nickrobinson nickrobinson committed with Feb 23, 2017
Showing with 3 additions and 2 deletions.
  1. +3 −2 autoload/rails.vim
View
@@ -3000,8 +3000,9 @@ endfunction
function! s:specEdit(cmd,...) abort
let describe = s:sub(s:sub(rails#camelize(a:0 ? a:1 : ''), '^[^:]*::', ''), '!.*', '')
return rails#buffer().open_command(a:cmd, a:0 ? a:1 : '', 'spec', [
- \ {'pattern': 'spec/*_spec.rb', 'template': "require 'spec_helper'\n\ndescribe ".describe." do\nend"},
- \ {'pattern': 'spec/spec_helper.rb'}])
+ \ {'pattern': 'spec/*_spec.rb', 'template': "require 'rails_helper'\n\ndescribe ".describe." do\nend"},
+ \ {'pattern': 'spec/spec_helper.rb'},
+ \ {'pattern': 'spec/rails_helper.rb'}])
endfunction
" }}}1

0 comments on commit 617c629

Please sign in to comment.