-
-
Notifications
You must be signed in to change notification settings - Fork 763
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
Summary output of shared failed examples is useless when examples defined in external file #793
Comments
I have created a fix for respec. https://github.com/oggy/respec/pull/3/files The formatter now looks through the Maybe it would make sense to apply a mechanism like this for the default formatter, too? |
Seems like a reasonable approach, however it should probably be based on |
|
See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration#pattern-instance_method RSpec treats files matching this glob pattern as spec files. The default is |
Ah I get it now! I'll apply this. Is there a chance that something like this will find its way into the RSpec core? So all formatters would print the |
I think it's a good idea. @myronmarston WDYT? |
Hm any idea on how to create a regexp from |
Ugh. Good point. /me puts on thinking cap ... |
This has bugged me before as well, but I hadn't really given thought to how we might change it....so I'm glad to see this discussion taking place. A few thoughts:
Yep, I'd like to fix things so that any formatters which use |
I'm happy to see that I could start a serious discussion about this. Let me know if I can be of any more help. 👍 |
Is there anything going on about this topic? |
Not yet. It's still an open issue to fix. I've had more important things on my radar. |
Wow, that's a fast answer! 👍 Sure thing there is more important stuff to do. And don't forget to take some time to relax during weekend! 😉 |
Our friend Oggy created something that should do it. What do you think about it? |
@sientia-jmu seems reasonable on first glance, but I'd have to dig deeper than I have time to right now to give you a real answer. |
Just ran into this, would love to get the discussion started again, see if we can't get this across the finish line |
When shared examples (that were defined in an external file, e.g.
spec/support/breadcrumbs.rb
) fail, their summary provides (to me) not the expected output.The line references point to the shared examples' file, but it would be more useful if they would point to the
xxx_spec.rb
file from which they were invoked. This way I could just copy&paste the line reference and rerun it, but as it currently is, I have to search in the output before the summary to really see what examples didn't run.Also, the very useful gem https://github.com/oggy/respec (which let's you re-run failed examples using
respec f
) uses the line reference to remember failed examples. This works perfectly for "normal" examples, but for shared examples, it's useless.Content of
.rspec_failures
:Is there a way to fix this? Or am I doing something wrong? It's convenient to have shared examples in their own external files in
spec/support
so they are loaded automatically before any other test is. Thank you.The text was updated successfully, but these errors were encountered: