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 140 def does_not_match?(block) !matches?(block) end
@private
# File rspec-expectations/lib/rspec/matchers/built_in/yield.rb, line 145 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 150 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 134 def matches?(block) @probe = YieldProbe.probe(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 155 def supports_block_expectations? true end
@private
# File rspec-expectations/lib/rspec/matchers/built_in/yield.rb, line 160 def supports_value_expectations? false end