rubocop:disable ClassLength @api private Provides the implementation for `contain_exactly` and `match_array`. Not intended to be instantiated directly.
@api private @return [String]
# File 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 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 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