Skip to content

Commit

Permalink
Merge pull request #1788 from G-Rath/add-missing-tests
Browse files Browse the repository at this point in the history
test: add missing cases for "include" matchers
  • Loading branch information
pirj authored Jan 25, 2024
2 parents 847fb7c + b1a81a4 commit 1c4b411
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions spec/rubocop/cop/rspec/rails/minitest_assertions_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 1c4b411

Please sign in to comment.