diff --git a/spec/rubocop/cli/auto_gen_config_spec.rb b/spec/rubocop/cli/auto_gen_config_spec.rb index de5ba8238b0..78bb5b2659d 100644 --- a/spec/rubocop/cli/auto_gen_config_spec.rb +++ b/spec/rubocop/cli/auto_gen_config_spec.rb @@ -8,7 +8,10 @@ include_context 'cli spec behavior' describe '--auto-gen-config' do - before { RuboCop::Formatter::DisabledConfigFormatter.config_to_allow_offenses = {} } + before do + RuboCop::Formatter::DisabledConfigFormatter.config_to_allow_offenses = {} + RuboCop::Formatter::DisabledConfigFormatter.detected_styles = {} + end shared_examples 'LineLength handling' do |ctx, initial_dotfile, exp_dotfile| context ctx do @@ -446,11 +449,10 @@ def fooBar; end todo_contents = File.read('.rubocop_todo.yml').lines[8..-1].join expect(todo_contents).to eq(<<~YAML) # Offense count: 1 - # Configuration parameters: EnforcedStyle, IgnoredPatterns. + # Configuration parameters: IgnoredPatterns. # SupportedStyles: snake_case, camelCase Naming/MethodName: - Exclude: - - 'example1.rb' + EnforcedStyle: camelCase # Offense count: 1 # Cop supports --auto-correct.