Method: RSpec.reset

Defined in:
lib/rspec/core.rb

.resetvoid

Used to ensure examples get reloaded and user configuration gets reset to defaults between multiple runs in the same process.

Users must invoke this if they want to have the configuration reset when they use the runner multiple times within the same process. Users must deal themselves with re-configuration of RSpec before run.


58
59
60
61
62
# File 'lib/rspec/core.rb', line 58

def self.reset
  RSpec::ExampleGroups.remove_all_constants
  @world = nil
  @configuration = nil
end