class RSpec::Matchers::BuiltIn::Eq

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

Public Instance Methods

description() click to toggle source

@api private @return [String]

# File lib/rspec/matchers/built_in/eq.rb, line 22
def description
  "eq #{expected_formatted}"
end
diffable?() click to toggle source

@api private @return [Boolean]

# File lib/rspec/matchers/built_in/eq.rb, line 28
def diffable?
  true
end
failure_message() click to toggle source

@api private @return [String]

# File lib/rspec/matchers/built_in/eq.rb, line 10
def failure_message
  "\nexpected: #{expected_formatted}\n     got: #{actual_formatted}\n\n(compared using ==)\n"
end
failure_message_when_negated() click to toggle source

@api private @return [String]

# File lib/rspec/matchers/built_in/eq.rb, line 16
def failure_message_when_negated
  "\nexpected: value != #{expected_formatted}\n     got: #{actual_formatted}\n\n(compared using ==)\n"
end

Private Instance Methods

match(expected, actual) click to toggle source
# File lib/rspec/matchers/built_in/eq.rb, line 34
def match(expected, actual)
  actual == expected
end