-
Notifications
You must be signed in to change notification settings - Fork 55
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
SuperDiff
doesn't respect extra_failure_lines
metadata of RSpec
#108
Comments
Thanks for bringing this up. It's very possible I forgot to include this or chose not to include this in order to get something out faster. Either way, this is definitely not expected. |
Would be great to find a solution for this, as the missing capybara screenshots is currently preventing us from using super_diff 🙏🏻 |
Also can't use it do to this! Do you happen to know where the change needs to occur, I could maybe get a PR up for it? |
@templeman15 Yup! So this gem patches the code in RSpec that's responsible for printing errors, as it has its own way of coloring the output. You can compare the two by looking at https://github.com/rspec/rspec-core/blob/a665896882ec941c4f3a19200fb23327dfd2ebff/lib/rspec/core/formatters/exception_presenter.rb and https://github.com/mcmire/super_diff/blob/afc80ab3d71a58a07ac4c6d71fe95582cac4b781/lib/super_diff/rspec/monkey_patches.rb (scroll down to ExceptionPresenter). It's a bit complicated, but the main difference is that whereas |
I apologize for the delay in addressing this bug. Thanks for the report — I've fixed this in #208. I'll post back when this is available in a release. |
RSpec holds additional information in
extra_failure_lines
metadata and it uses when showing failure lines.https://github.com/rspec/rspec-core/blob/fe3084758857f0714f05ada44a18f1dfe9bf7a7e/lib/rspec/core/formatters/exception_presenter.rb#L161
For example, system examples set failures screenshot paths in the metadata.
https://github.com/rspec/rspec-rails/blob/9217638aff96df56753eeafe60e16bc4c35b8566/lib/rspec/rails/example/system_example_group.rb#L118
But it seems that
SuperDiff
doesn't the metadata when showing tests result. Is it expected behavior?The text was updated successfully, but these errors were encountered: