Parent

Included Modules

Class Index [+]

Quicksearch

RSpec::Matchers::BuiltIn::YieldWithNoArgs

Public Instance Methods

failure_message_for_should() click to toggle source
    # File lib/rspec/matchers/built_in/yield.rb, line 92
92:         def failure_message_for_should
93:           "expected given block to yield with no arguments, but #{failure_reason}"
94:         end
failure_message_for_should_not() click to toggle source
    # File lib/rspec/matchers/built_in/yield.rb, line 96
96:         def failure_message_for_should_not
97:           "expected given block not to yield with no arguments, but did"
98:         end
matches?(block) click to toggle source
    # File lib/rspec/matchers/built_in/yield.rb, line 87
87:         def matches?(block)
88:           @probe = YieldProbe.probe(block)
89:           @probe.yielded_once?(:yield_with_no_args) && @probe.single_yield_args.none?
90:         end

Private Instance Methods

failure_reason() click to toggle source
     # File lib/rspec/matchers/built_in/yield.rb, line 102
102:         def failure_reason
103:           if @probe.num_yields.zero?
104:             "did not yield"
105:           else
106:             "yielded with arguments: #{@probe.single_yield_args.inspect}"
107:           end
108:         end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.