# File lib/autotest.rb, line 275
  def initialize
    # these two are set directly because they're wrapped with
    # add/remove/clear accessor methods
    @exception_list = []
    @test_mappings = []
    @child = nil

    self.completed_re =
      /\d+ tests, \d+ assertions, \d+ failures, \d+ errors(, \d+ skips)?/
    self.extra_class_map   = {}
    self.extra_files       = []
    self.failed_results_re = /^\s+\d+\) (?:Failure|Error):\n(.*?)\((.*?)\)/
    self.files_to_test     = new_hash_of_arrays
    self.find_order        = []
    self.known_files       = nil
    self.libs              = %w[. lib test].join(File::PATH_SEPARATOR)
    self.order             = :random
    self.output            = $stderr
    self.prefix            = nil
    self.sleep             = 1
    self.testlib           = "test/unit"
    specified_directories  = ARGV.reject { |arg| arg.start_with?("-") } # options are not directories
    self.find_directories  = specified_directories.empty? ? ['.'] : specified_directories
    self.unit_diff         = nil
    self.latest_results    = nil

    # file in /lib -> run test in /test
    self.add_mapping(/^lib\/.*\.rb$/) do |filename, _|
      possible = File.basename(filename).gsub '_', '_?' # ' stupid emacs
      files_matching %r%^test/.*#{possible}$%
    end

    # file in /test -> run it
    self.add_mapping(/^test.*\/test_.*rb$/) do |filename, _|
      filename
    end

    default_configs = [File.expand_path('~/.autotest'), './.autotest']
    configs = options[:rc] || default_configs

    configs.each do |f|
      load f if File.exist? f
    end
  end