File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -92,9 +92,9 @@ def infer_spec_type_from_file_location!
92
92
93
93
# Adds exclusion filters for gems included with Rails
94
94
def filter_rails_from_backtrace!
95
- filter_gems_from_backtrace "actionmailer" , "actionpack" , "actionview"
95
+ filter_gems_from_backtrace "actionmailer" , "actionpack" , "actionview"
96
96
filter_gems_from_backtrace "activemodel" , "activerecord" ,
97
- "activesupport" , "activejob"
97
+ "activesupport" , "activejob"
98
98
end
99
99
end
100
100
Original file line number Diff line number Diff line change 2
2
require 'rspec/support/spec/in_sub_process'
3
3
4
4
RSpec . describe "Configuration" do
5
-
6
5
include RSpec ::Support ::InSubProcess
7
6
8
7
subject ( :config ) { RSpec ::Core ::Configuration . new }
102
101
specify "#filter_rails_from_backtrace! adds exclusion patterns for rails gems" do
103
102
config . filter_rails_from_backtrace!
104
103
105
- gems = %w(
104
+ gems = %w[
106
105
actionmailer
107
106
actionpack
108
107
actionview
109
108
activemodel
110
109
activerecord
111
110
activesupport
112
111
activejob
113
- )
112
+ ]
114
113
exclusions = config . backtrace_exclusion_patterns . map ( &:to_s )
115
114
aggregate_failures do
116
- gems . each { |gem | expect ( exclusions ) . to include ( %r( #{ gem } ) ) }
115
+ gems . each { |gem | expect ( exclusions ) . to include ( / #{ gem } / ) }
117
116
end
118
117
end
119
118
@@ -247,5 +246,4 @@ def in_inferring_type_from_location_environment
247
246
expect ( group . new ) . to be_a ( RSpec ::Rails ::MailerExampleGroup )
248
247
end
249
248
end
250
-
251
249
end
You can’t perform that action at this time.
0 commit comments