-
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
Diff of Range objects is less useful than default RSpec output #154
Comments
Thank you @owst, that definitely seems like a legitimate bug (I encountered a similar issue yesterday myself). I'll take a look when I get a chance! |
We're falling back on the |
Fix for #154. Adds a RangeObject inspection tree builder so Range objects are printed as strings, like this: ``` (1..2) ``` instead of as default objects: ``` #<Range:0x123456 ... ``` --------- Co-authored-by: Joe Stein <[email protected]>
Oh, I hadn't noticed that @lucaseras had already created a very similar PR as I was about to 🙌 @jas14 should this issue be closed? |
It should! I thought it had been automatically, sorry about that and thanks for highlighting. |
When an expectation that two Range objects are equal is violated, the super_diff output hides the values within the Ranges:
which makes it hard to diagnose the cause as you can't see the values within. The default RSpec formatter makes it clear:
would it be possible to change the super_diff output to show the values within the Ranges?
A standalone reproduction script:
Thanks,
Owen.
The text was updated successfully, but these errors were encountered: