class RSpec::Matchers::BuiltIn::Eq

Not intended to be instantiated directly.
Provides the implementation for ‘eq`.
@api private

def description

Returns:
  • (String) -

Other tags:
    Api: - private
def description
  "eq #{expected_formatted}"
end

def diffable?

Returns:
  • (Boolean) -

Other tags:
    Api: - private
def diffable?
  true
end

def failure_message

Returns:
  • (String) -

Other tags:
    Api: - private
def failure_message
  if string_encoding_differs?
    "\nexpected: #{format_encoding(expected)} #{expected_formatted}\n     got: #{format_encoding(actual)} #{actual_formatted}\n\n(compared using ==)\n"
  else
    "\nexpected: #{expected_formatted}\n     got: #{actual_formatted}\n\n(compared using ==)\n"
  end
end

def failure_message_when_negated

Returns:
  • (String) -

Other tags:
    Api: - private
def failure_message_when_negated
  "\nexpected: value != #{expected_formatted}\n     got: #{actual_formatted}\n\n(compared using ==)\n"
end

def match(expected, actual)

def match(expected, actual)
  actual == expected
end