class RSpec::Matchers::BuiltIn::YieldWithNoArgs

def failure_message_for_should

def failure_message_for_should
  "expected given block to yield with no arguments, but #{failure_reason}"
end

def failure_message_for_should_not

def failure_message_for_should_not
  "expected given block not to yield with no arguments, but did"
end

def failure_reason

def failure_reason
  if @probe.num_yields.zero?
    "did not yield"
  else
    "yielded with arguments: #{@probe.single_yield_args.inspect}"
  end
end

def matches?(block)

def matches?(block)
  @probe = YieldProbe.probe(block)
  @probe.yielded_once?(:yield_with_no_args) && @probe.single_yield_args.empty?
end

def supports_block_expectations?

Other tags:
    Private: -
def supports_block_expectations?
  true
end