类: RSpec::Matchers::BuiltIn::DynamicPredicate 私有
- 继承
-
BaseMatcher
- Object
- BaseMatcher
- RSpec::Matchers::BuiltIn::DynamicPredicate
- 定义在
- lib/rspec/matchers/built_in/has.rb
概述
此类是私有 API 的一部分。 应尽量避免使用此类,因为它可能在将来被删除或更改。
提供动态谓词匹配器的实现。 不建议直接继承。
直接已知子类
常量摘要
从 BaseMatcher 继承的常量
实例方法摘要 收起
- #description ⇒ String 私有
- #failure_message ⇒ String 私有
- #failure_message_when_negated ⇒ String 私有
-
#initialize(method_name, *args, &block) ⇒ DynamicPredicate 构造函数 私有
一个新的 DynamicPredicate 实例。
从 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(method_name, *args, &block) ⇒DynamicPredicate
此方法是私有 API 的一部分。 应尽量避免使用此方法,因为它可能在将来被删除或更改。
返回一个新的 DynamicPredicate 实例。
10 11 12 |
# File 'lib/rspec/matchers/built_in/has.rb', line 10 def initialize(method_name, *args, &block) @method_name, @args, @block = method_name, args, block end |
实例方法详情
#description ⇒String
此方法是私有 API 的一部分。 应尽量避免使用此方法,因为它可能在将来被删除或更改。
43 44 45 |
# File 'lib/rspec/matchers/built_in/has.rb', line 43 def description "#{method_description}#{args_to_sentence}" end |
#failure_message ⇒String
此方法是私有 API 的一部分。 应尽量避免使用此方法,因为它可能在将来被删除或更改。
31 32 33 |
# File 'lib/rspec/matchers/built_in/has.rb', line 31 def (true) end |
#failure_message_when_negated ⇒String
此方法是私有 API 的一部分。 应尽量避免使用此方法,因为它可能在将来被删除或更改。
37 38 39 |
# File 'lib/rspec/matchers/built_in/has.rb', line 37 def (false) end |