lib/assert/assert_runner.rb in assert-2.13.0 vs lib/assert/assert_runner.rb in assert-2.14.0
- old
+ new
@@ -25,10 +25,15 @@
# load any test helper file
if test_dir && (h = File.join(test_dir, self.config.test_helper)) && File.exists?(h)
Assert::CLI.bench('Require test helper'){ require h }
end
+ if self.config.list
+ $stdout.puts test_files
+ halt
+ end
+
# load the test files
self.config.view.fire(:before_load, test_files)
Assert::CLI.bench("Require #{test_files.count} test files") do
test_files.each{ |p| require p }
end
@@ -41,12 +46,16 @@
def run
self.config.runner.run(self.config.suite, self.config.view)
end
- protected
+ private
+ def halt
+ throw(:halt)
+ end
+
def apply_user_settings
safe_require("#{ENV['HOME']}/#{USER_SETTINGS_FILE}") if ENV['HOME']
end
def apply_local_settings
@@ -58,11 +67,9 @@
end
def apply_env_settings
self.config.runner_seed ENV['ASSERT_RUNNER_SEED'].to_i if ENV['ASSERT_RUNNER_SEED']
end
-
- private
def test_files(test_paths)
file_paths = if self.config.changed_only
changed_test_files(test_paths)
else