From 5d504570fd5c6398a8ae04e439eaa744b4598fbd Mon Sep 17 00:00:00 2001 From: John Bintz Date: Thu, 1 Dec 2011 08:59:05 -0500 Subject: [PATCH] small refactoring --- lib/jasmine/headless/files_list.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/jasmine/headless/files_list.rb b/lib/jasmine/headless/files_list.rb index 5ffdd5f..68ef4e4 100644 --- a/lib/jasmine/headless/files_list.rb +++ b/lib/jasmine/headless/files_list.rb @@ -184,12 +184,12 @@ module Jasmine::Headless def add_files(patterns, type, dirs) 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.each do |path| - add_path(path, type) if File.file?(path) + add_path(path, type) end end