-
-
Notifications
You must be signed in to change notification settings - Fork 285
Add new RSpec/Rails/NegationBeValid cop
#1665
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
54c507a to
afe023c
Compare
e4a9933 to
b98d41f
Compare
pirj
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, thank you!
|
Is this cop safe? |
|
TBH quite a strange cop. As mentioned above, it { expect(1).to be_odd }
it { expect(1).not_to be_even }Also using expect(foo).not_to be_valid.and be_oddare not supported and must be written as |
This PR add test for following case: #1665 (comment)
This PR add test for following case: rubocop/rubocop-rspec#1665 (comment)
This PR add test for following case: rubocop/rubocop-rspec#1665 (comment)
Fix: #1660
Before submitting the PR make sure the following are checked:
master(if not - rebase it).CHANGELOG.mdif 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).If you have created a new cop:
config/default.yml.Enabled: pendinginconfig/default.yml.Enabled: truein.rubocop.yml.VersionAdded: "<<next>>"indefault/config.yml.