Class: RSpec::Matchers::BuiltIn::Eql
- Inherits:
-
BaseMatcher
- Object
- BaseMatcher
- RSpec::Matchers::BuiltIn::Eql
- Defined in:
- lib/rspec/matchers/built_in/eql.rb
Constant Summary
Constant Summary
Constants inherited from BaseMatcher
Instance Attribute Summary
Attributes inherited from BaseMatcher
#actual, #expected, #rescued_exception
Instance Method Summary (collapse)
- - (Boolean) diffable?
- - (Object) failure_message_for_should
- - (Object) failure_message_for_should_not
- - (Object) match(expected, actual)
Methods inherited from BaseMatcher
#description, #initialize, #match_unless_raises, #matches?, #supports_block_expectations?
Methods included from MatchAliases
Methods included from Pretty
#_pretty_print, #expected_to_sentence, #name, #name_to_sentence, #split_words, #to_sentence, #to_word, #underscore
Constructor Details
This class inherits a constructor from RSpec::Matchers::BuiltIn::BaseMatcher
Instance Method Details
- (Boolean) diffable?
17 18 19 |
# File 'lib/rspec/matchers/built_in/eql.rb', line 17 def diffable? true end |
- (Object) failure_message_for_should
9 10 11 |
# File 'lib/rspec/matchers/built_in/eql.rb', line 9 def "\nexpected: #{expected.inspect}\n got: #{actual.inspect}\n\n(compared using eql?)\n" end |
- (Object) failure_message_for_should_not
13 14 15 |
# File 'lib/rspec/matchers/built_in/eql.rb', line 13 def "\nexpected: value != #{expected.inspect}\n got: #{actual.inspect}\n\n(compared using eql?)\n" end |
- (Object) match(expected, actual)
5 6 7 |
# File 'lib/rspec/matchers/built_in/eql.rb', line 5 def match(expected, actual) actual.eql? expected end |