Skip to content
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

RSpec/PendingWithoutReason in 2.16.0 gives false positive in factories with pending attribute #1565

Closed
RDeckard opened this issue Jan 17, 2023 · 3 comments · Fixed by #1566
Closed

Comments

@RDeckard
Copy link

This is related to the "False positive for RSpec/PendingWithoutReason in 2.16.0 when object has a method pending" issue, because if those objects have any factory, we still have this false positive offense:
image

Not sure the best way to handle that. Indeed, in our project, we could exclude the spec/factories path for this cop in .rubocop.yml, but maybe this exclusion should be handled by the cop itself? Depending if you consider that using factory_bot along with rspec is very usual, or where this responsibility stands. WDYT?

@pirj
Copy link
Member

pirj commented Jan 17, 2023

Fixed in 2.17

@pirj pirj closed this as completed Jan 17, 2023
ydah added a commit to ydah/rubocop-rspec that referenced this issue Jan 17, 2023
ydah added a commit to ydah/rubocop-rspec that referenced this issue Jan 17, 2023
@ydah
Copy link
Member

ydah commented Jan 17, 2023

@pirj I checked here, and it seems to be false positive in the following cases where a block is given to pending/skip.
So The following Pull Request was opened:

@pirj
Copy link
Member

pirj commented Jan 18, 2023

Provided there is a cop that is watching over in-example ‘pending’/‘skip’ with blocks, I’m fine with fixing this false positive in ‘PendingWiyhoutReason’ that additionally avoids duplicate offences, and to completely split responsibilities.

@pirj pirj reopened this Jan 18, 2023
ydah added a commit to ydah/rubocop-rspec that referenced this issue Jan 22, 2023
ydah added a commit to ydah/rubocop-rspec that referenced this issue Jan 23, 2023
ydah added a commit to ydah/rubocop-rspec that referenced this issue Jan 23, 2023
ydah added a commit to ydah/rubocop-rspec that referenced this issue Jan 23, 2023
ydah added a commit to ydah/rubocop-rspec that referenced this issue Jan 26, 2023
ydah added a commit to ydah/rubocop-rspec that referenced this issue Jan 26, 2023
ydah added a commit to ydah/rubocop-rspec that referenced this issue Jan 26, 2023
ydah added a commit to ydah/rubocop-rspec that referenced this issue Jan 26, 2023
ydah added a commit to ydah/rubocop-rspec that referenced this issue Jan 27, 2023
ydah added a commit to ydah/rubocop-rspec that referenced this issue Jan 27, 2023
ydah added a commit to ydah/rubocop-rspec that referenced this issue Jan 27, 2023
ydah added a commit to ydah/rubocop-rspec that referenced this issue Jan 29, 2023
@pirj pirj closed this as completed in #1566 Feb 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants