-
-
Notifications
You must be signed in to change notification settings - Fork 760
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
There should be a way to run single specs in a shared group in isolation #82
Comments
David, I think I might have a solution for this: When "it_should_behave_like" (or the alias) is called, it sets the following metadata on the ExampleGroup: Name of the shared example group. When an example fails, RSpec will check to see if that example exists in the shared example group. If it does, it will append to the output the file path and line number (stored in the ExampleGroup metadata). What do you think? |
Oh nice I see that metadata is already there :-) |
You can run a single example in a shared group via |
Yep - that's true. That's good enough for me. I'm going to close this. @carllerche if you think this is not sufficient, comment here and I'll reopen this. |
Crap, found a bug with this:
Investigating. |
I want to deprecate share_as. It generates a module, which you then use |
I completely agree with deprecating it. When I first started learning RSpec, I was confused why there was I tend to use
I switched to |
For anyone skipping to the bottom I want to point out that justinko provided a completely satisfactory answer to this above.
|
Here is an example backtrace gotten from running an entire spec suite that uses shared spec groups
There are a few problems here.
given the backtrace, I have no idea what the context of the shared spec is. Aka, where was it included, what file was it included in, etc... There is the description 'Arel Join#each iterates over the rows in any order', but in a project with a lot of specs, that's basically useless to me.
I would like a way to run that single spec in isolation in the context that caused it to fail. I'm not sure of how to do that right now.
The text was updated successfully, but these errors were encountered: