-
-
Notifications
You must be signed in to change notification settings - Fork 271
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
Add Strict
configuration option to RSpec/PendingWithoutReason
#1603
Conversation
I wonder is |
It is very difficult to decide which is the default. |
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.
We should just ignore this
RSpec.describe 'something' do
pending 'does something'
end
as it's a way to remind self to write a spec for something, or to indicate that something is yet to be implemented along with a proper spec. Previously discussed here.
Is there a good reason to be strict about this?
15407c0
to
32ddcab
Compare
The motivation for this PR was not to make it more strict than before, but rather to make it possible to avoid violations for the following cases depending on the configuration options. RSpec.describe 'something' do
pending 'does something'
end The goal was not to ignore them entirely, but to allow control through configuration options. |
However, it may be valid to simply ignore offenses even without using a configuration option 🤔. In that case, this PR could be closed and we could proceed with the release, unless I have missed something. |
…nding/skip has a reason inside an example group" This reverts commit 223da38.
This PR is add `Strict` configuration option to `RSpec/PendingWithoutReason`. The following PR was found to be an incorrect fix, so I have reverted and added support for this option. - rubocop#1598 This option works as before by default, but setting it to `Strict: false` will make it a violation only in the following cases - when a `pending` or `skip` method is called with no arguments - When a pending/skip is done as metadata for example or example group, but there is no reason for it
I'd go with just ignoring this case. |
I agree. So let's leave this case on ignore. RSpec.describe 'something' do
pending 'does something'
end So is it correct to say that the following concerns have been addressed and the blocker in the release is gone? Please point out if I have missed something. |
This PR is add
Strict
configuration option toRSpec/PendingWithoutReason
.The following PR was found to be an incorrect fix, so I have reverted and added support for this option.
RSpec/PendingWithoutReason
when pending/skip has a reason inside an example group #1598This option works as before by default, but setting it to
Strict: false
will make it a violation only in the following casespending
orskip
method is called with no argumentsBefore submitting the PR make sure the following are checked:
master
(if not - rebase it).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).If you have modified an existing cop's configuration options:
VersionChanged: "<<next>>"
inconfig/default.yml
.