method
load_tests
v7.2.3 -
Show latest stable
- Class:
Rails::TestUnit::Runner
load_tests(argv)public
No documentation available.
# File railties/lib/rails/test_unit/runner.rb, line 61
def load_tests(argv)
patterns = extract_filters(argv)
tests = list_tests(patterns)
tests.to_a.each do |path|
abs_path = File.expand_path(path)
require abs_path
rescue LoadError => exception
if exception.path == abs_path
all_tests = list_tests([default_test_glob])
corrections = DidYouMean::SpellChecker.new(dictionary: all_tests).correct(path)
if corrections.empty?
raise exception
end
raise(InvalidTestError.new(path, DidYouMean::Formatter.message_for(corrections)), cause: nil)
else
raise
end
end
end