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 hook scope aliases :example
and :group
#297
Conversation
FYI - I need to let this stew a bit before doing it. I'm personally a big fan, but I don't want to create confusion for many to ease confusion of few. Might be something to include in a 3.0 release, which I don't want to do for a while (probably not before 6 months since the 2.0 release). So I'm leaving this open for the moment. |
Sure thing; thanks, David. |
Triage fairy here. Do these years-old issues that are in the 3.0 milestone need to be bumped and re-discussed, or are they in 3.0 so people don't have to think about them for now and I should leave them alone? |
@Peeja -- thanks for helping triage issues! I generally tag things as "3.0" so that we keep the ticket open (since it's a valid issue) but make it obvious we're not planning on addressing it before 3.0. |
|
Personally... I feel it's less intuitive, because we don't make clear what an example or a group is, (I know those are the names internally but this isn't test unit we don't expose those to people). I'd support these aliases though, some folk will like them, some won't. I'd prefer |
I'm actually pretty excited for this. |
perhaps before(:each_spec) and before(:this_context)? |
@JonRowe @soulcutter @myronmarston @alindeman what do you think about my names? I think it'd be good to close this one out sooner rather than later. |
I think I prefer I will say don't like |
I think :example and :context is also good. @fj would you mind updating this to use those symbols? |
I think it's worth while to change the aliases if a majority of the community finds them to be more clear. However, there hasn't yet been a consensus: between the original mailing list thread and this discussion, there have been something like 8 different proposals for new aliases. I don't think there's enough consensus on this yet. Personally, if we're going to change it, my vote would be for |
FYI, I'm happy to update the PR and will take ownership whenever you feel consensus has been reached. @myronmarston How would you propose we discover what the consensus is? Straw poll on the mailing list? |
I think asking folks to comment here would be a good way to go about it. We can spread the word through twitter and the mailing list. |
OK, consider this comment the poll then. There is a proposal to add sensible aliases for
|
+1 for |
+1 for |
If we need to add aliases, I'll +1 for |
+1 for |
I might be biased but after so many years with |
Ah didn't read about the vote comment. I vote for we don't need aliases. My reasoning is more aliases will just lead to more confusion. |
I’m not sure these aliases are necessary but I prefer |
No aliases. Personally, I find the aliases to be more confusing. I may be biased from using If aliases are added, I would prefer My reasoning boils down to the current DSL.
|
I've changed my mind and consider |
@myronmarston @JonRowe this one's gotten properly stale. My feeling based on this is that the conclusion was |
@samphippen -- I'm still mulling it over a bit. I almost closed this a while back as there wasn't real consensus; however, recently I've seen a couple situations where people were confused about this: RSpec.configure do |config|
config.before(:all) do
# do something
end
end In the context of Given that, I'm now thinking that we should add the aliases, and |
I'm happy to update the pull request accordingly if you're on board with changing it to |
@fj that'd be great, if you could also rebase against master that'd be |
Well, sure. It'd be a a pretty lame commit if it wasn't against a rebased master. :) |
@myronmarston Just confirming: are you okay with |
|
@fj just wanting to bump this. Are you still up for opening a new PR? |
Closing this one so that discussion can move to the other PR, #1174. My mind's a little blown that I opened this original PR 3 years ago... |
Thanks for sticking with us, @fj :). Sometimes it takes us awhile to come around... |
As per a discussion on the mailing list, Evgeniy Dolzhenko suggested that if we were going to have aliases, it would be optimal to have a change that introduced the aliases of
:example
, and:group
, to parallel the existing:suite
alias.Here is a change that does this.