The new Style/MixinGrouping incorrectly registers an offense when rspec's include-expectation is used with multiple elements.
Expected behavior
Rubocop does not register an offense.
Actual behavior
Rubocop registers an offense.
Steps to reproduce the problem
Create the following file, e.g. as mixin_grouping_spec.rb:
require 'rspec'
describe 'rubocop Style/MixinGrouping' do
it 'should not register an offense for rspec-include' do
expect([1, 2, 3]).to include(1, 2)
end
end
Call rubocop mixin_grouping_spec.rb:
$ rubocop mixin_grouping_spec.rb
Inspecting 1 file
C
Offenses:
mixin_grouping_spec.rb:5:26: C: Put include mixins in separate statements.
expect([1, 2, 3]).to include(1, 2)
^^^^^^^^^^^^^
1 file inspected, 1 offense detected
RuboCop version
$ rubocop -V
0.48.0 (using Parser 2.4.0.0, running on ruby 2.4.0 x86_64-darwin16)
The new Style/MixinGrouping incorrectly registers an offense when rspec's include-expectation is used with multiple elements.
Expected behavior
Rubocop does not register an offense.
Actual behavior
Rubocop registers an offense.
Steps to reproduce the problem
Create the following file, e.g. as
mixin_grouping_spec.rb:Call
rubocop mixin_grouping_spec.rb:RuboCop version