Class: RSpec::Matchers::BuiltIn::YieldControl Private
- Inherits:
-
BaseMatcher
- Object
- BaseMatcher
- RSpec::Matchers::BuiltIn::YieldControl
- Includes:
- CountExpectation
- Defined in:
- lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-expectations-3.12.2/lib/rspec/matchers/built_in/yield.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Provides the implementation for ‘yield_control`. Not intended to be instantiated directly.
Constant Summary
Constants inherited from BaseMatcher
Instance Attribute Summary
Attributes inherited from BaseMatcher
#actual, #expected, #matcher_name, #rescued_exception
Instance Method Summary collapse
- #does_not_match?(block) ⇒ Boolean private
- #failure_message ⇒ String private
- #failure_message_when_negated ⇒ String private
- #matches?(block) ⇒ Boolean private
- #supports_block_expectations? ⇒ Boolean private
- #supports_value_expectations? ⇒ Boolean private
Methods included from CountExpectation
#at_least, #at_most, #exactly, #once, #thrice, #times, #twice
Methods inherited from BaseMatcher
#actual_formatted, #description, #diffable?, #expected_formatted, #expects_call_stack_jump?, #initialize, #match_unless_raises, matcher_name
Methods included from BaseMatcher::DefaultFailureMessages
Methods included from BaseMatcher::HashFormatting
Methods included from Composable
#===, #and, #description_of, #or, should_enumerate?, surface_descriptions_in, unreadable_io?, #values_match?
Constructor Details
This class inherits a constructor from RSpec::Matchers::BuiltIn::BaseMatcher
Instance Method Details
#does_not_match?(block) ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
111 112 113 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-expectations-3.12.2/lib/rspec/matchers/built_in/yield.rb', line 111 def does_not_match?(block) !matches?(block) && @probe.has_block? end |
#failure_message ⇒ String
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
117 118 119 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-expectations-3.12.2/lib/rspec/matchers/built_in/yield.rb', line 117 def 'expected given block to yield control' + failure_reason end |
#failure_message_when_negated ⇒ String
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
123 124 125 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-expectations-3.12.2/lib/rspec/matchers/built_in/yield.rb', line 123 def 'expected given block not to yield control' + failure_reason end |
#matches?(block) ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
104 105 106 107 108 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-expectations-3.12.2/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 |
#supports_block_expectations? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
128 129 130 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-expectations-3.12.2/lib/rspec/matchers/built_in/yield.rb', line 128 def supports_block_expectations? true end |
#supports_value_expectations? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
133 134 135 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-expectations-3.12.2/lib/rspec/matchers/built_in/yield.rb', line 133 def supports_value_expectations? false end |