Skip to content

Commit b9befd3

Browse files
committed
Remove default configuration from specs
After rubocop/rubocop#7970, all specs with the `:config` metadata by default use the default configuration. So now, there is often no reason to add a cop's default configuration in specs.
1 parent 0d63424 commit b9befd3

File tree

3 files changed

+1
-6
lines changed

3 files changed

+1
-6
lines changed

spec/rubocop/cop/rspec/capybara/feature_methods_spec.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
RSpec.describe RuboCop::Cop::RSpec::Capybara::FeatureMethods, :config do
44
subject(:cop) { described_class.new(config) }
55

6-
let(:cop_config) { { 'EnabledMethods' => [] } }
7-
86
it 'flags violations for `background`' do
97
expect_offense(<<-RUBY)
108
describe 'some feature' do

spec/rubocop/cop/rspec/empty_line_after_example_spec.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
RSpec.describe RuboCop::Cop::RSpec::EmptyLineAfterExample, :config do
44
subject(:cop) { described_class.new(config) }
55

6-
let(:cop_config) { { 'AllowConsecutiveOneLiners' => true } }
7-
86
it 'flags a missing empty line after `it`' do
97
expect_offense(<<-RUBY)
108
RSpec.describe Foo do

spec/rubocop/cop/rspec/example_wording_spec.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
context 'with configuration' do
77
let(:cop_config) do
88
{
9-
'CustomTransform' => { 'have' => 'has' },
10-
'IgnoredWords' => %w[only really]
9+
'IgnoredWords' => %w[only really]
1110
}
1211
end
1312

0 commit comments

Comments
 (0)