Class: Lookout::Equalities::Hash
- Defined in:
- lib/lookout/equalities/hash.rb
Instance Method Summary collapse
Methods inherited from Object
Instance Method Details
#diff(expected, actual) ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/lookout/equalities/hash.rb', line 11 def diff(expected, actual) return if expected.size == 1 or not Hash === actual Lookout::Diff::Formats::Hash. new(Lookout::Diff::Operations. new(Lookout::Diff::Algorithms::Difflib. new(array(actual), array(expected)))).to_a.join("\n") end |