failure_message_for_should()click to toggle source
# File lib/rspec/matchers/built_in/yield.rb, line 89deffailure_message_for_should"expected given block to yield with no arguments, but #{failure_reason}"end
failure_message_for_should_not()click to toggle source
# File lib/rspec/matchers/built_in/yield.rb, line 93deffailure_message_for_should_not"expected given block not to yield with no arguments, but did"end
matches?(block)click to toggle source
# File lib/rspec/matchers/built_in/yield.rb, line 84defmatches?(block)
@probe = YieldProbe.probe(block)
@probe.yielded_once?(:yield_with_no_args) &&@probe.single_yield_args.none?end