File tree Expand file tree Collapse file tree 2 files changed +8
-10
lines changed Expand file tree Collapse file tree 2 files changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -125,14 +125,4 @@ def using_source_path(path)
125
125
'config.warnings = false'
126
126
gsub_file '.rspec' , '--warnings' , ''
127
127
128
- append_to_file 'spec/rails_helper.rb' , <<-EOT . gsub ( /^ +\| / , '' )
129
- |RSpec.configure do |config|
130
- | [:controller, :view, :request].each do |type|
131
- | config.include Rails::Controller::Testing::TestProcess, :type => type
132
- | config.include Rails::Controller::Testing::TemplateAssertions, :type => type
133
- | config.include Rails::Controller::Testing::Integration, :type => type
134
- | end
135
- |end
136
- EOT
137
-
138
128
final_tasks
Original file line number Diff line number Diff line change @@ -106,6 +106,14 @@ def filter_rails_from_backtrace!
106
106
config . include RSpec ::Rails ::ViewExampleGroup , :type => :view
107
107
config . include RSpec ::Rails ::FeatureExampleGroup , :type => :feature
108
108
109
+ if defined? ( ::Rails ::Controller ::Testing )
110
+ [ :controller , :view , :request ] . each do |type |
111
+ config . include ::Rails ::Controller ::Testing ::TestProcess , :type => type
112
+ config . include ::Rails ::Controller ::Testing ::TemplateAssertions , :type => type
113
+ config . include ::Rails ::Controller ::Testing ::Integration , :type => type
114
+ end
115
+ end
116
+
109
117
if defined? ( ActionMailer )
110
118
config . include RSpec ::Rails ::MailerExampleGroup , :type => :mailer
111
119
end
You can’t perform that action at this time.
0 commit comments