Skip to content

Commit 62ad3ad

Browse files
committed
Fix a build error
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 ```
1 parent 0189504 commit 62ad3ad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spec/rubocop/cli/autocorrect_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
{foo: 1, bar: 2, baz: 3}.reject {|k, v| k == :bar }
5252
RUBY
5353

54-
expect(cli.run(['-a', '--only', 'Style/HashExcept'])).to eq(0)
54+
expect(cli.run(['-A', '--only', 'Style/HashExcept'])).to eq(0)
5555
expect(File.read('example.rb')).to eq(<<~RUBY)
5656
{foo: 1, bar: 2, baz: 3}.except(:bar)
5757
RUBY

0 commit comments

Comments
 (0)