Class: Assert::AssertRunner

Inherits:
Object
  • Object
show all
Defined in:
lib/assert/assert_runner.rb

Constant Summary collapse

TEST_FILE_SUFFIXES =
['_tests.rb', '_test.rb']
USER_SETTINGS_FILE =
".assert/init.rb"
LOCAL_SETTINGS_FILE =
".assert.rb"

Instance Method Summary collapse

Constructor Details

#initialize(test_paths, test_options) ⇒ AssertRunner

Returns a new instance of AssertRunner.



8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/assert/assert_runner.rb', line 8

def initialize(test_paths, test_options)
  require 'assert'  # inits config singleton with the default settings

  
  apply_local_settings
  apply_option_settings(test_options)
  apply_env_settings

  files = test_files(test_paths.empty? ? [*Assert.config.test_dir] : test_paths)
  Assert.init(files, {
    :test_dir_path => path_of(Assert.config.test_dir, files.first)
  })
end

Instance Method Details

#runObject



22
23
24
# File 'lib/assert/assert_runner.rb', line 22

def run
  Assert.runner.run(Assert.suite, Assert.view)
end