类: RSpec::Matchers::BuiltIn::Equal 私有
- 继承
-
BaseMatcher
- Object
- BaseMatcher
- RSpec::Matchers::BuiltIn::Equal
- 定义于
- lib/rspec/matchers/built_in/equal.rb
概述
此类属于私有 API 的一部分。 应尽可能避免使用此类,因为它可能会在将来被移除或更改。
提供 equal
的实现。不建议直接实例化。
常量摘要
从 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 的一部分。 应尽可能避免使用此方法,因为它可能会在将来被移除或更改。
33 34 35 |
# File 'lib/rspec/matchers/built_in/equal.rb', line 33 def diffable? !expected_is_a_literal_singleton? end |
#failure_message ⇒String
此方法属于私有 API 的一部分。 应尽可能避免使用此方法,因为它可能会在将来被移除或更改。
10 11 12 13 14 15 16 |
# File 'lib/rspec/matchers/built_in/equal.rb', line 10 def if expected_is_a_literal_singleton? else end end |
#failure_message_when_negated ⇒String
此方法属于私有 API 的一部分。 应尽可能避免使用此方法,因为它可能会在将来被移除或更改。
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/rspec/matchers/built_in/equal.rb', line 20 def <<-MESSAGE expected not #{inspect_object(actual)} got #{inspect_object(expected)} Compared using equal?, which compares object identity. MESSAGE end |