class RSpec::Matchers::BuiltIn::ContainExactly
rubocop:disable Metrics/ClassLength @api private Provides the implementation for ‘contain_exactly` and `match_array`. Not intended to be instantiated directly.
Public Instance Methods
@api private @return [String]
# File rspec-expectations/lib/rspec/matchers/built_in/contain_exactly.rb, line 29 def description list = EnglishPhrasing.list(surface_descriptions_in(expected)) "contain exactly#{list}" end
@api private @return [String]
# File rspec-expectations/lib/rspec/matchers/built_in/contain_exactly.rb, line 11 def failure_message if Array === actual generate_failure_message else "expected a collection that can be converted to an array with " \ "`#to_ary` or `#to_a`, but got #{actual_formatted}" end end
@api private @return [String]
# File rspec-expectations/lib/rspec/matchers/built_in/contain_exactly.rb, line 22 def failure_message_when_negated list = EnglishPhrasing.list(surface_descriptions_in(expected)) "expected #{actual_formatted} not to contain exactly#{list}" end
Calls superclass method
RSpec::Matchers::BuiltIn::BaseMatcher#matches?
# File rspec-expectations/lib/rspec/matchers/built_in/contain_exactly.rb, line 34 def matches?(actual) @pairings_maximizer = nil @best_solution = nil @extra_items = nil @missing_items = nil super(actual) end