Method: Mocha::Expectation#multiple_yields
- Defined in:
- lib/mocha/expectation.rb
#multiple_yields(*parameter_groups) ⇒ Expectation
Modifies expectation so that when the expected method is called, it yields multiple times per invocation with the specified parameter_groups.
If no block is provided, the method will still attempt to yield resulting in a LocalJumpError. Note that this is what would happen if a “real” (non-mock) method implementation tried to yield to a non-existent block.
430 431 432 433 |
# File 'lib/mocha/expectation.rb', line 430 def multiple_yields(*parameter_groups) @yield_parameters.add(*parameter_groups) self end |