class RSpec::Matchers::BuiltIn::YieldWithNoArgs
@api private Provides the implementation for ‘yield_with_no_args`. Not intended to be instantiated directly.
Public Instance Methods
@private
# File rspec-expectations/lib/rspec/matchers/built_in/yield.rb, line 158 def does_not_match?(block) !matches?(block) && @probe.has_block? end
@private
# File rspec-expectations/lib/rspec/matchers/built_in/yield.rb, line 163 def failure_message "expected given block to yield with no arguments, but #{positive_failure_reason}" end
@private
# File rspec-expectations/lib/rspec/matchers/built_in/yield.rb, line 168 def failure_message_when_negated "expected given block not to yield with no arguments, but #{negative_failure_reason}" end
@private
# File rspec-expectations/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
@private
# File rspec-expectations/lib/rspec/matchers/built_in/yield.rb, line 173 def supports_block_expectations? true end
@private
# File rspec-expectations/lib/rspec/matchers/built_in/yield.rb, line 178 def supports_value_expectations? false end