Class: Lookout::Expected::Array
- Defined in:
- lib/lookout-3.0/expected/array.rb
Overview
Represents expected Arrays.
Instance Method Summary collapse
-
#difference(actual) ⇒ Difference::Array?
A difference report between ACTUAL and #expected unless their content exhibit no differences.
Methods inherited from Object
Instance Method Details
#difference(actual) ⇒ Difference::Array?
Returns A difference report between ACTUAL and #expected unless their content exhibit no differences.
8 9 10 11 12 13 14 15 |
# File 'lib/lookout-3.0/expected/array.rb', line 8 def difference(actual) Lookout::Difference::Array.new(actual, expected) unless Array === actual and expected.size == actual.size and expected.enum_for(:none?).with_index{ |v, i| v.to_lookout_expected.difference(actual[i]) } end |