class RSpec::Matchers::BuiltIn::Equal
@api private Provides the implementation for ‘equal`. Not intended to be instantiated directly.
Constants
- LITERAL_SINGLETONS
Public Instance Methods
@api private @return [Boolean]
# File rspec-expectations/lib/rspec/matchers/built_in/equal.rb, line 33 def diffable? !expected_is_a_literal_singleton? end
@api private @return [String]
# File rspec-expectations/lib/rspec/matchers/built_in/equal.rb, line 10 def failure_message if expected_is_a_literal_singleton? simple_failure_message else detailed_failure_message end end
@api private @return [String]
# File rspec-expectations/lib/rspec/matchers/built_in/equal.rb, line 20 def failure_message_when_negated <<-MESSAGE expected not #{inspect_object(actual)} got #{inspect_object(expected)} Compared using equal?, which compares object identity. MESSAGE end