Method: RSpec::Matchers#contain_exactly
- Defined in:
- lib/rspec/matchers.rb
#contain_exactly(*items) ⇒ Object Also known as: a_collection_containing_exactly, containing_exactly
Note:
This is also available using the =~
operator with should
,
but =~
is not supported with expect
.
Passes if actual contains all of the expected regardless of order. This works for collections. Pass in multiple args and it will only pass if all args are found in collection.
510 511 512 |
# File 'lib/rspec/matchers.rb', line 510 def contain_exactly(*items) BuiltIn::ContainExactly.new(items) end |