Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use
expect_correction
instead of autocorrect_source_with_loop
Follow up #8062. This commit fixes the following build error because `autocorrect_source_with_loop` has been removed by rubocop/rubocop@510f3f7f. ```console % bundle exec rake (snip) 1) RuboCop::Cop::Performance::CaseWhenSplat autocorrect moves multiple splat condition to the end of the when conditions Failure/Error: new_source = autocorrect_source_with_loop(<<~RUBY) case foo when *cond1 bar when *cond2 foobar when 5 baz end RUBY NoMethodError: undefined method `autocorrect_source_with_loop' for #<RSpec::ExampleGroups::RuboCopCopPerformanceCaseWhenSplat::Autocorrect:0x00007f881ec9df58> Did you mean? autocorrect_source_file # ./spec/rubocop/cop/performance/case_when_splat_spec.rb:277:in `block (3 levels) in <top (required)>' 2) RuboCop::Cop::Performance::CaseWhenSplat autocorrect moves multiple out of order splat condition to the end of the when conditions Failure/Error: new_source = autocorrect_source_with_loop(<<~RUBY) case foo when *cond1 bar when 3 doo when *cond2 foobar when 6 baz NoMethodError: undefined method `autocorrect_source_with_loop' for #<RSpec::ExampleGroups::RuboCopCopPerformanceCaseWhenSplat::Autocorrect:0x00007f881ec2df00> Did you mean? autocorrect_source_file # ./spec/rubocop/cop/performance/case_when_splat_spec.rb:302:in `block (3 levels) in <top (required)>' ```
- Loading branch information