类: RSpec::Matchers::BuiltIn::Satisfy 私有
- 继承
-
BaseMatcher
- Object
- BaseMatcher
- RSpec::Matchers::BuiltIn::Satisfy
- 定义在
- lib/rspec/matchers/built_in/satisfy.rb
概述
此类是私有 API 的一部分。 应尽可能避免使用此类,因为它可能在将来被删除或更改。
为 satisfy
提供实现。不打算直接实例化。
常量摘要
从 BaseMatcher 继承的常量
实例方法摘要 折叠
- #failure_message ⇒ String 私有
- #failure_message_when_negated ⇒ String 私有
-
#initialize(description = nil, &block) ⇒ Satisfy 构造函数 私有
一个新的 Satisfy 实例。
从 BaseMatcher 继承的方法
#diffable?, #expects_call_stack_jump?, #match_unless_raises, #supports_block_expectations?
从 Composable 包含的方法
#===, #and, #description_of, #or, should_enumerate?, surface_descriptions_in, unreadable_io?, #values_match?
构造函数详情
#initialize(description = nil, &block) ⇒Satisfy
此方法是私有 API 的一部分。 应尽可能避免使用此方法,因为它可能在将来被删除或更改。
返回一个新的 Satisfy 实例。
8 9 10 11 |
# File 'lib/rspec/matchers/built_in/satisfy.rb', line 8 def initialize(description=nil, &block) @description = description @block = block end |
实例方法详情
#failure_message ⇒String
此方法是私有 API 的一部分。 应尽可能避免使用此方法,因为它可能在将来被删除或更改。
27 28 29 |
# File 'lib/rspec/matchers/built_in/satisfy.rb', line 27 def "expected #{actual_formatted} to #{description}" end |
#failure_message_when_negated ⇒String
此方法是私有 API 的一部分。 应尽可能避免使用此方法,因为它可能在将来被删除或更改。
33 34 35 |
# File 'lib/rspec/matchers/built_in/satisfy.rb', line 33 def "expected #{actual_formatted} not to #{description}" end |