Re-add ordering methods

This commit is contained in:
Michael Miller 2019-08-06 23:22:50 -06:00
parent 3314ce8579
commit 6a317b7a21

View file

@ -45,6 +45,14 @@ module Spectator::Matchers
end end
end end
def in_order
self
end
def in_any_order
UnorderedArrayMatcher.new(expected)
end
private def compare_arrays(expected_elements, actual_elements) private def compare_arrays(expected_elements, actual_elements)
if expected_elements.size == actual_elements.size if expected_elements.size == actual_elements.size
index = 0 index = 0