Sets an undefined constant for the duration of an example.
@private
# File lib/rspec/mocks/mutate_const.rb, line 338 def mutate @parent = @context_parts.inject(Object) do |klass, name| if const_defined_on?(klass, name) get_const_defined_on(klass, name) else ConstantMutator.stub(name_for(klass, name), Module.new) end end @parent.const_set(@const_name, @mutated_value) end
Generated with the Darkfish Rdoc Generator 2.