-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Rename pending!
method
#10095
Comments
So you propose an entire new stat for this? Success, failed, errored, pending, skipped? |
I doubt it's much use to report skipped and pending specs separately in the spec output. They should probably just be listed combined as skipped, whether it's because the spec is not implemented ( |
@straight-shoota Due to the different semantics there is a room for usefulness in reporting them separately. |
Sure, there's room for later improvement ;) But right now, I'd like to simply change to skip and nothing more. |
I don't see much point in renaming it. Any spec that's not run is "awaiting conclusion" in some way, otherwise it would not have been written in the first place. In the multicast example that conclusion just lies within the external environment rather than the spec itself. But then I also cannot really care less about how the functionality is called. I just didn't want to introduce yet another concept. |
But these really are different concepts. Whether a spec is not implemented or can't run may ask for different handling. See #10094 for how this matters. |
I agree with @jhass. This would create a new concept and I see no need for that. My choice to reduce the chance of a silent failure in the CI would be to add a "max pending allowed" or "error on pending". If that is not enough, allow "error on pending!" only could do the trick: like SPEC_ERROR_ON_PENDING=YES|BANG|NO. Having something that an skipped spec, that is not pending is confusing to me. |
In RSpec, one of the differences with pending is that you can actually implement the test and let it execute, but its failure condition is reversed. This allows you to know that once the pending condition is no longer valid, you can un-mark it as pending. https://rspec.info/documentation/3.9/rspec-core/RSpec/Core/Pending.html
|
@bcardiff "error on pending!" does not make any sense whatsoever with the pre-existing But That is already a different concept. I'm not suggesting to introduce it, it's already here since #9566. This proposal is just about calling it out by not using the same names |
The
pending!
method was introduced as a side effect in #9566 as a means to skip a spec at runtime when it can't be executed because the environment misses something (like multicast support).I suggest to rename this method. "pending" means, something is awaiting conclusion.
This is the case for the specs that are not yet implemented. But a spec that can't execute because of a lacking environment at runtime is already completed. It won't be concluded (unless external factors are changed, but that's a different story) and thus
pending!
is not an adequate description.A better name would be the generic
skip!
. It doesn't imply any reason for why it's skipped. It could be because the implementation of a particular branch is in fact "pending", but that's rarely the case. Mostly a spec would be skipped because of external factors.Related: #10094
The text was updated successfully, but these errors were encountered: