class RSpec::Mocks::ConstantMutator::ConstantHider
@api private
Hides a defined constant for the duration of an example.
def mutate
def mutate @context = recursive_const_get(@context_parts.join('::')) @original_value = get_const_defined_on(@context, @const_name) @context.send(:remove_const, @const_name) end
def rspec_reset
def rspec_reset @context.const_set(@const_name, @original_value) end
def to_constant
def to_constant const = super const.hidden = true const.previously_defined = true const end