Skip to content

Commit

Permalink
Remove default configuration from specs
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bquorning committed May 24, 2020
1 parent 0d63424 commit b9befd3
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 6 deletions.
2 changes: 0 additions & 2 deletions spec/rubocop/cop/rspec/capybara/feature_methods_spec.rb
Expand Up @@ -3,8 +3,6 @@
RSpec.describe RuboCop::Cop::RSpec::Capybara::FeatureMethods, :config do
subject(:cop) { described_class.new(config) }

let(:cop_config) { { 'EnabledMethods' => [] } }

it 'flags violations for `background`' do
expect_offense(<<-RUBY)
describe 'some feature' do
Expand Down
2 changes: 0 additions & 2 deletions spec/rubocop/cop/rspec/empty_line_after_example_spec.rb
Expand Up @@ -3,8 +3,6 @@
RSpec.describe RuboCop::Cop::RSpec::EmptyLineAfterExample, :config do
subject(:cop) { described_class.new(config) }

let(:cop_config) { { 'AllowConsecutiveOneLiners' => true } }

it 'flags a missing empty line after `it`' do
expect_offense(<<-RUBY)
RSpec.describe Foo do
Expand Down
3 changes: 1 addition & 2 deletions spec/rubocop/cop/rspec/example_wording_spec.rb
Expand Up @@ -6,8 +6,7 @@
context 'with configuration' do
let(:cop_config) do
{
'CustomTransform' => { 'have' => 'has' },
'IgnoredWords' => %w[only really]
'IgnoredWords' => %w[only really]
}
end

Expand Down

0 comments on commit b9befd3

Please sign in to comment.