lib/tork/driver.rb in tork-19.9.0 vs lib/tork/driver.rb in tork-19.10.0
- old
+ new
@@ -24,16 +24,17 @@
pclose @herald
pclose @engine
end
def run_all_test_files
- all_test_files = Dir[*ALL_TEST_FILE_GLOBS]
- if all_test_files.empty?
- tell @client, 'There are no test files to run.'
- else
- run_non_overhead_test_files all_test_files
+ test_files_found = false
+ Dir.glob(*ALL_TEST_FILE_GLOBS) do |test_file|
+ next if overhead_file? test_file
+ run_test_file test_file
+ test_files_found = true
end
+ tell @client, 'There are no test files to run.' unless test_files_found
end
# accept and delegate tork-engine(1) commands
Engine.public_instance_methods(false).each do |name|
unless method_defined? name
@@ -87,10 +88,10 @@
end
def find_dependent_test_files source_file, results=Set.new
TEST_FILE_GLOBBERS.each do |regexp, globber|
if regexp =~ source_file and globs = globber.call($~)
- Dir[*globs].each do |dependent_file|
+ Dir.glob(*globs) do |dependent_file|
if results.add? dependent_file
find_dependent_test_files dependent_file, results
end
end
end