Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Follow up rubocop/rubocop#11163. This commit fixes the following build error: ```console % bundle exec rspec spec/rubocop/cli/autocorrect_spec.rb (snip) Failures: 1) RuboCop::CLI --autocorrect corrects `Style/HashExcept` with `TargetRubyVersion: 2.0` Got 2 failures from failure aggregation block. # ./spec/support/cli_spec_behavior.rb:25:in `block (2 levels) in <top (required)>' 1.1) Failure/Error: expect(cli.run(['-a', '--only', 'Style/HashExcept'])).to eq(0) expected: 0 got: 1 (compared using ==) # ./spec/rubocop/cli/autocorrect_spec.rb:54:in `block (2 levels) in <top (required)>' 1.2) Failure/Error: expect(File.read('example.rb')).to eq(<<~RUBY) {foo: 1, bar: 2, baz: 3}.except(:bar) RUBY expected: "{foo: 1, bar: 2, baz: 3}.except(:bar)\n" got: "{foo: 1, bar: 2, baz: 3}.reject {|k, v| k == :bar }\n" (compared using ==) Diff: @@ -1 +1 @@ -{foo: 1, bar: 2, baz: 3}.except(:bar) +{foo: 1, bar: 2, baz: 3}.reject {|k, v| k == :bar } # ./spec/rubocop/cli/autocorrect_spec.rb:55:in `block (2 levels) in <top (required)>' Finished in 0.28529 seconds (files took 1.12 seconds to load) 3 examples, 1 failure ```
- Loading branch information