Added content to the list of matchers for Capybara/NegationMatcher.
It allows said cop to check for not_to have_content, correct it to to have_no_content and vice versa.
have_content is not included in Capybara list of have_no_.. matchers but is rather aliased to have_no_text. (source).
I'm not sure if thats perhaps a problem for this PR`s change. Maybe a different approach has to be taken due to above said.
Before submitting the PR make sure the following are checked:
[x] Feature branch is up-to-date with main (if not - rebase it).
[x] Squashed related commits together.
[x] Added tests.
[ ] Updated documentation.
[x] Added an entry to the CHANGELOG.md if the new code introduces user-observable changes.
[x] The build (bundle exec rake) passes (be sure to run this locally, since it may produce updated documentation that you will need to commit).
Added
content
to the list of matchers forCapybara/NegationMatcher
. It allows said cop to check fornot_to have_content
, correct it toto have_no_content
and vice versa.have_content
is not included in Capybara list ofhave_no_..
matchers but is rather aliased tohave_no_text
. (source). I'm not sure if thats perhaps a problem for this PR`s change. Maybe a different approach has to be taken due to above said.Before submitting the PR make sure the following are checked:
main
(if not - rebase it).Updated documentation.CHANGELOG.md
if the new code introduces user-observable changes.bundle exec rake
) passes (be sure to run this locally, since it may produce updated documentation that you will need to commit).