-
Notifications
You must be signed in to change notification settings - Fork 240
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
Rerun failed spec with example groups in different files does not work. #243
Comments
Looking to the metadata location could be a nice way of fixing that, @907th what are you thinking? |
Don't know really. Workaround seems good to me. @slowjack2k: |
Yep right, @slowjack2k could you submit a PR please? |
I'm not sure that it's good idea to |
Yeah I wouldn't |
I'll try to create a pull request. |
I can create a pr if the changes are sufficient. |
Is it possible to use rspec -l 4 switch insteed of _spec.rb:4? With shared examples I have an strange rspec behavior that the shared examples are not executed when I use _spec.rb:4, but when I use -I 4 _spec.rb it is executed. |
Which rspec version are you using, with 2.14.7 I got:
|
I have also 2.14.7 . The -l switch works fine but spec_filename:line_number does not play well with shared example groups. guard-rspec uses
insteed of
, right? |
Yep, if changing to the later fix it and works everywhere no problem for me. |
guard-rspec may come running several specs at the same time... so using |
An example what not works https://gist.github.com/slowjack2k/8319290 (rspec issue). It's special when you use a shared example in a shared example. @907th yeah, I think your right, the switch would break things :( |
The core issue is a rspec issue listed here rspec/rspec-core#793.
For example:
I have a shared_examples in lib/my_shared_example.rb.
I use this shared example in spec/lib/my_other_spec.rb.
And an expectation of this shared example groups fails,
then guard-rspec tries to execute the file lib/my_shared_example.rb
insteed of spec/lib/my_other_spec.rb.
I found 2 workarounds for this:
1st workaround:
Guardfile
2nd workaround:
spec_helper.rb
Is there a better way to fix this issue?
The text was updated successfully, but these errors were encountered: