Consolidate messages when using both `verbose_retry` and `display_try_failure_messages`
crawfoal opened this issue · 1 comments
crawfoal commented
When I use both of those configuration options, this is what I see:
User signs out
2nd Try error in ./spec/features/users/logout_spec.rb:4:
Net::ReadTimeout
RSpec::Retry: 2nd try ./spec/features/users/logout_spec.rb:4
with valid session
Lines 2-3 make it sound like the 2nd try failed due to a Net::ReadTimeout
, when really the 1st try failed for that reason. Also, lines 2 and 5 are essentially the same and it would be nice to not have to see both of them. I feel like the following is clearer:
User signs out
RSpec::Retry: 2nd try running due to Net::ReadTimeout (from line ./spec/features/users/logout_spec.rb:4)
with valid session
And if they have only configured verbose_retry
, and not display_try_failure_messages
, then maybe they don't need to see the line of the error, and just this is enough:
User signs out
RSpec::Retry: 2nd try
with valid session
michaelglass commented
Would love a PR to fix these bits and pieces. We now have some small test framework around our test output.