Method: RSpec::Matchers#match_array

Defined in:
lib/rspec/matchers.rb

#match_array(items) ⇒ Object Also known as: an_array_matching

An alternate form of contain_exactly that accepts the expected contents as a single array arg rather than splatted out as individual items.

Examples:

expect(results).to contain_exactly(1, 2)
# is identical to:
expect(results).to match_array([1, 2])

See Also:



715
716
717
# File 'lib/rspec/matchers.rb', line 715

def match_array(items)
  contain_exactly(*items)
end