mirror of https://github.com/rails/rails
Extract `list_tests` from `Rails::TestUnit::Runner.load_tests`
This commit has been made for a future change for Active Record bin/test to run its own database adapter related tests.
This commit is contained in:
parent
061bf3156f
commit
39b305c0b7
|
@ -43,10 +43,7 @@ module Rails
|
|||
end
|
||||
|
||||
def load_tests(argv)
|
||||
patterns = extract_filters(argv)
|
||||
|
||||
tests = Rake::FileList[patterns.any? ? patterns : default_test_glob]
|
||||
tests.exclude(default_test_exclude_glob) if patterns.empty?
|
||||
tests = list_tests(argv)
|
||||
tests.to_a.each { |path| require File.expand_path(path) }
|
||||
end
|
||||
|
||||
|
@ -94,6 +91,14 @@ module Rails
|
|||
def path_argument?(arg)
|
||||
%r"^[/\\]?\w+[/\\]".match?(arg)
|
||||
end
|
||||
|
||||
def list_tests(argv)
|
||||
patterns = extract_filters(argv)
|
||||
|
||||
tests = Rake::FileList[patterns.any? ? patterns : default_test_glob]
|
||||
tests.exclude(default_test_exclude_glob) if patterns.empty?
|
||||
tests
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue