Method: RSpec::Mocks::ExampleMethods#hide_const
- Defined in:
- lib/rspec/mocks/example_methods.rb
#hide_const(constant_name) ⇒ Object
Hides the named constant with the given value. The constant will be undefined for the duration of the test.
Like method stubs, the constant will be restored to its original value when the example completes.
256 257 258 |
# File 'lib/rspec/mocks/example_methods.rb', line 256 def hide_const(constant_name) ConstantMutator.hide(constant_name) end |