Skip to content

Commit 8118b91

Browse files
committed
Clean up some rubocop offenses
1 parent 570911a commit 8118b91

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

lib/rspec/rails/configuration.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,9 @@ def infer_spec_type_from_file_location!
9292

9393
# Adds exclusion filters for gems included with Rails
9494
def filter_rails_from_backtrace!
95-
filter_gems_from_backtrace "actionmailer", "actionpack" ,"actionview"
95+
filter_gems_from_backtrace "actionmailer", "actionpack", "actionview"
9696
filter_gems_from_backtrace "activemodel", "activerecord",
97-
"activesupport", "activejob"
97+
"activesupport", "activejob"
9898
end
9999
end
100100

spec/rspec/rails/configuration_spec.rb

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
require 'rspec/support/spec/in_sub_process'
33

44
RSpec.describe "Configuration" do
5-
65
include RSpec::Support::InSubProcess
76

87
subject(:config) { RSpec::Core::Configuration.new }
@@ -102,18 +101,18 @@
102101
specify "#filter_rails_from_backtrace! adds exclusion patterns for rails gems" do
103102
config.filter_rails_from_backtrace!
104103

105-
gems = %w(
104+
gems = %w[
106105
actionmailer
107106
actionpack
108107
actionview
109108
activemodel
110109
activerecord
111110
activesupport
112111
activejob
113-
)
112+
]
114113
exclusions = config.backtrace_exclusion_patterns.map(&:to_s)
115114
aggregate_failures do
116-
gems.each { |gem| expect(exclusions).to include(%r(#{gem})) }
115+
gems.each { |gem| expect(exclusions).to include(/#{gem}/) }
117116
end
118117
end
119118

@@ -247,5 +246,4 @@ def in_inferring_type_from_location_environment
247246
expect(group.new).to be_a(RSpec::Rails::MailerExampleGroup)
248247
end
249248
end
250-
251249
end

0 commit comments

Comments
 (0)