diff --git a/spec/rubocop/cop/rspec/rails/minitest_assertions_spec.rb b/spec/rubocop/cop/rspec/rails/minitest_assertions_spec.rb index b5e5fd505..b4f13f6a7 100644 --- a/spec/rubocop/cop/rspec/rails/minitest_assertions_spec.rb +++ b/spec/rubocop/cop/rspec/rails/minitest_assertions_spec.rb @@ -251,6 +251,23 @@ refute_includes a, b ^^^^^^^^^^^^^^^^^^^^ Use `expect(a).not_to include(b)`. RUBY + + expect_correction(<<~RUBY) + expect(a).not_to include(b) + RUBY + end + + it 'does not register an offense when using `expect(a).to include(b)`' do + expect_no_offenses(<<~RUBY) + expect(a).to include(b) + RUBY + end + + it 'does not register an offense when ' \ + 'using `expect(a).not_to include(b)`' do + expect_no_offenses(<<~RUBY) + expect(a).not_to include(b) + RUBY end end