类: RSpec::Matchers::BuiltIn::Eql 私有
- 继承
-
BaseMatcher
- Object
- BaseMatcher
- RSpec::Matchers::BuiltIn::Eql
- 定义于
- lib/rspec/matchers/built_in/eql.rb
概述
此类是私有 API 的一部分。 应尽量避免使用此类,因为它将来可能会被移除或更改。
提供 eql
的实现。 不建议直接实例化。
常量摘要
从 BaseMatcher 继承的常量
实例方法摘要 折叠
从 BaseMatcher 继承的方法
#description, #expects_call_stack_jump?, #initialize, #match_unless_raises, #matches?, #supports_block_expectations?
从 Composable 包含的方法
#===, #and, #description_of, #or, should_enumerate?, surface_descriptions_in, unreadable_io?, #values_match?
构造函数详细信息
此类从 RSpec::Matchers::BuiltIn::BaseMatcher 继承了构造函数
实例方法详细信息
#diffable? ⇒Boolean
此方法是私有 API 的一部分。 应尽量避免使用此方法,因为它将来可能会被移除或更改。
26 27 28 |
# File 'lib/rspec/matchers/built_in/eql.rb', line 26 def diffable? true end |
#failure_message ⇒String
此方法是私有 API 的一部分。 应尽量避免使用此方法,因为它将来可能会被移除或更改。
10 11 12 13 14 15 16 |
# File 'lib/rspec/matchers/built_in/eql.rb', line 10 def if string_encoding_differs? "\nexpected: #{format_encoding(expected)} #{expected_formatted}\n got: #{format_encoding(actual)} #{actual_formatted}\n\n(compared using eql?)\n" else "\nexpected: #{expected_formatted}\n got: #{actual_formatted}\n\n(compared using eql?)\n" end end |
#failure_message_when_negated ⇒String
此方法是私有 API 的一部分。 应尽量避免使用此方法,因为它将来可能会被移除或更改。
20 21 22 |
# File 'lib/rspec/matchers/built_in/eql.rb', line 20 def "\nexpected: value != #{expected_formatted}\n got: #{actual_formatted}\n\n(compared using eql?)\n" end |