class RSpec::Matchers::BuiltIn::ContainExactly

@api private Provides the implementation for ‘contain_exactly` and `match_array`. Not intended to be instantiated directly. rubocop:disable Metrics/ClassLength

Public Instance Methods

@api private @return [String]

# File rspec-expectations/lib/rspec/matchers/built_in/contain_exactly.rb, line 31
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 13
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 24
def failure_message_when_negated
  list = EnglishPhrasing.list(surface_descriptions_in(expected))
  "expected #{actual_formatted} not to contain exactly#{list}"
end
# File rspec-expectations/lib/rspec/matchers/built_in/contain_exactly.rb, line 36
def matches?(actual)
  @pairings_maximizer = nil
  @best_solution = nil
  @extra_items = nil
  @missing_items = nil
  super(actual)
end