class RSpec::Matchers::BuiltIn::YieldControl

Not intended to be instantiated directly.
Provides the implementation for ‘yield_control`.
@api private

def does_not_match?(block)

Other tags:
    Private: -
def does_not_match?(block)
  !matches?(block) && @probe.has_block?
end

def failure_message

Returns:
  • (String) -

Other tags:
    Api: - private
def failure_message
  'expected given block to yield control' + failure_reason
end

def failure_message_when_negated

Returns:
  • (String) -

Other tags:
    Api: - private
def failure_message_when_negated
  'expected given block not to yield control' + failure_reason
end

def failure_reason

def failure_reason
  return ' but was not a block' unless @probe.has_block?
  return "#{count_expectation_description} but did not yield" if @probe.num_yields == 0
  count_failure_reason('yielded')
end

def matches?(block)

Other tags:
    Private: -
def matches?(block)
  @probe = YieldProbe.probe(block)
  return false unless @probe.has_block?
  expected_count_matches?(@probe.num_yields)
end

def supports_block_expectations?

Other tags:
    Private: -
def supports_block_expectations?
  true
end

def supports_value_expectations?

Other tags:
    Private: -
def supports_value_expectations?
  false
end