Class: RSpec::Matchers::BuiltIn::YieldWithNoArgs Private
- Inherits:
-
BaseMatcher
- Object
- BaseMatcher
- RSpec::Matchers::BuiltIn::YieldWithNoArgs
- 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_with_no_args`. 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 ⇒ Object private
- #failure_message_when_negated ⇒ Object private
- #matches?(block) ⇒ Boolean private
- #supports_block_expectations? ⇒ Boolean private
- #supports_value_expectations? ⇒ Boolean private
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.
158 159 160 |
# 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 158 def does_not_match?(block) !matches?(block) && @probe.has_block? end |
#failure_message ⇒ Object
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.
163 164 165 |
# 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 163 def "expected given block to yield with no arguments, but #{positive_failure_reason}" end |
#failure_message_when_negated ⇒ Object
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.
168 169 170 |
# 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 168 def "expected given block not to yield with no arguments, but #{negative_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.
151 152 153 154 155 |
# 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 151 def matches?(block) @probe = YieldProbe.probe(block) return false unless @probe.has_block? @probe.yielded_once?(:yield_with_no_args) && @probe.single_yield_args.empty? 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.
173 174 175 |
# 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 173 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.
178 179 180 |
# 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 178 def supports_value_expectations? false end |