class RSpec::Matchers::BuiltIn::YieldControl
@api private Provides the implementation for ‘yield_control`. Not intended to be instantiated directly.
Public Instance Methods
@private
# File rspec-expectations/lib/rspec/matchers/built_in/yield.rb, line 111 def does_not_match?(block) !matches?(block) && @probe.has_block? end
@api private @return [String]
# File rspec-expectations/lib/rspec/matchers/built_in/yield.rb, line 117 def failure_message 'expected given block to yield control' + failure_reason end
@api private @return [String]
# File rspec-expectations/lib/rspec/matchers/built_in/yield.rb, line 123 def failure_message_when_negated 'expected given block not to yield control' + failure_reason end
@private
# File rspec-expectations/lib/rspec/matchers/built_in/yield.rb, line 104 def matches?(block) @probe = YieldProbe.probe(block) return false unless @probe.has_block? expected_count_matches?(@probe.num_yields) end
@private
# File rspec-expectations/lib/rspec/matchers/built_in/yield.rb, line 128 def supports_block_expectations? true end
@private
# File rspec-expectations/lib/rspec/matchers/built_in/yield.rb, line 133 def supports_value_expectations? false end