class method
self.load_tests
Ruby on Rails 7.2.3
Since v5.2.8.1Signature
self.load_tests(argv)
No documentation comment.
Parameters
-
argvreq
Source
# 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
Defined in railties/lib/rails/test_unit/runner.rb line 61
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Rails::TestUnit::Runner