small refactoring

This commit is contained in:
John Bintz 2011-12-01 08:59:05 -05:00
parent a291fd5de3
commit 5d504570fd

View File

@ -184,12 +184,12 @@ module Jasmine::Headless
def add_files(patterns, type, dirs) def add_files(patterns, type, dirs)
dirs.product(patterns).each do |search| dirs.product(patterns).each do |search|
files = Dir[File.join(*search)].find_all { |file| file[extension_filter] } files = expanded_dir(File.join(*search))
files.sort! { |a, b| Kernel.rand(3) - 1 } if type == 'spec_files' files.sort! { |a, b| Kernel.rand(3) - 1 } if type == 'spec_files'
files.each do |path| files.each do |path|
add_path(path, type) if File.file?(path) add_path(path, type)
end end
end end