class Mocha::Configuration
def override(temporary_options)
- Example: Temporarily allow stubbing of +nil+ -
Other tags:
- Yield: - block during which the configuration change will be in force.
Parameters:
-
temporary_options
(Hash
) -- the configuration options to apply for the duration of the block.
def override(temporary_options) original_configuration = configuration @configuration = configuration.merge(new(temporary_options)) yield ensure @configuration = original_configuration end