Class: Lookout::Equality::Hash
Instance Method Summary collapse
Methods inherited from Object
Instance Method Details
#diff(expected, actual) ⇒ Object
122 123 124 125 126 127 128 |
# File 'lib/lookout/equality.rb', line 122 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 |