You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When an expectation that two Range objects are equal is violated, the super_diff output hides the values within the Ranges:
Failure/Error: expect(actual).to eq(expected)
Expected #<Range:0x00007ff9338559b0> to eq #<Range:0x00007ff933855988>.
Diff:
┌ (Key) ──────────────────────────┐
│ ‹-› in expected, not in actual │
│ ‹+› in actual, not in expected │
│ ‹ › in both expected and actual │
└─────────────────────────────────┘
#<Range:0x00007ff9338559b0 {
}>
# repro.rb:20:in `block (2 levels) in <main>'
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:
require'bundler/inline'gemfiledosource'https://rubygems.org'gem'rspec',"= 3.11.0"gem'super_diff',"= 0.9.0",require: falseendrequire"rspec/autorun"# Uncomment the next line to see less-useful output# require "super_diff/rspec"RSpec.describe"Range comparisons"doitdoactual=(1..10)expected=(1..20)expect(actual).toeq(expected)endend
Thanks,
Owen.
The text was updated successfully, but these errors were encountered:
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: