diff --git a/config/default.yml b/config/default.yml index a259887819f..6f00f110e80 100644 --- a/config/default.yml +++ b/config/default.yml @@ -2327,8 +2327,8 @@ Lint/UselessMethodDefinition: Description: 'Checks for useless method definitions.' Enabled: true VersionAdded: '0.90' + VersionChanged: '0.91' Safe: false - AllowComments: true Lint/UselessRuby2Keywords: Description: 'Finds unnecessary uses of `ruby2_keywords`.' diff --git a/spec/rubocop/cop/lint/useless_method_definition_spec.rb b/spec/rubocop/cop/lint/useless_method_definition_spec.rb index f1ba8a2c94d..ed0fa56c8d6 100644 --- a/spec/rubocop/cop/lint/useless_method_definition_spec.rb +++ b/spec/rubocop/cop/lint/useless_method_definition_spec.rb @@ -1,8 +1,6 @@ # frozen_string_literal: true RSpec.describe RuboCop::Cop::Lint::UselessMethodDefinition, :config do - let(:cop_config) { { 'AllowComments' => true } } - it 'does not register an offense for empty constructor' do expect_no_offenses(<<~RUBY) class Foo