类: RSpec::Matchers::BuiltIn::YieldControl 私有

继承自
BaseMatcher
  • Object
显示全部
包含
CountExpectation
定义在
lib/rspec/matchers/built_in/yield.rb

概述

此类是私有 API 的一部分。 应尽可能避免使用此类,因为它可能会在将来被删除或更改。

提供 yield_control 的实现。不打算直接实例化。

常量摘要

BaseMatcher 继承的常量

BaseMatcher::UNDEFINED

实例方法摘要 折叠

CountExpectation 包含的方法

#at_least, #at_most, #exactly, #once, #thrice, #times, #twice

BaseMatcher 继承的方法

#description, #diffable?, #expects_call_stack_jump?, #initialize, #match_unless_raises

Composable 包含的方法

#===, #and, #description_of, #or, should_enumerate?, surface_descriptions_in, unreadable_io?, #values_match?

构造函数细节

此类从 RSpec::Matchers::BuiltIn::BaseMatcher 继承一个构造函数

实例方法细节

#failure_messageString

此方法是私有 API 的一部分。 应尽可能避免使用此方法,因为它可能会在将来被删除或更改。

返回

  • (String)
117
118
119
# File 'lib/rspec/matchers/built_in/yield.rb', line 117
def failure_message
  'expected given block to yield control' + failure_reason
end

#failure_message_when_negatedString

此方法是私有 API 的一部分。 应尽可能避免使用此方法,因为它可能会在将来被删除或更改。

返回

  • (String)
123
124
125
# File 'lib/rspec/matchers/built_in/yield.rb', line 123
def failure_message_when_negated
  'expected given block not to yield control' + failure_reason
end