Method: RSpec::Core::World#reset

Defined in:
lib/rspec/core/world.rb

#resetvoid

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Reset world to 'scratch' before running suite.



60
61
62
63
64
65
66
# File 'lib/rspec/core/world.rb', line 60

def reset
  RSpec::ExampleGroups.remove_all_constants
  example_groups.clear
  @sources_by_path.clear if defined?(@sources_by_path)
  @syntax_highlighter = nil
  @example_group_counts_by_spec_file = Hash.new(0)
end