diff --git a/ChangeLog b/ChangeLog index 546c472ade..3a85bc176a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sat Mar 1 17:51:34 2008 Nobuyoshi Nakada + + * lib/test/unit/collector/dir.rb (recursive_collect): do not always + include all test_*.rb. + Sat Mar 1 14:14:17 2008 Yukihiro Matsumoto * development snapshot 1.9.0-1 released. diff --git a/lib/test/unit/collector/dir.rb b/lib/test/unit/collector/dir.rb index 59c664dbb7..365345430f 100644 --- a/lib/test/unit/collector/dir.rb +++ b/lib/test/unit/collector/dir.rb @@ -16,7 +16,7 @@ module Test @file = file @object_space = object_space @req = req - @pattern = [/\btest_.*\.rb\Z/m] + @pattern = [] @exclude = [] end @@ -59,11 +59,12 @@ module Test next if(e == '.' || e == '..') e_name = dir_name ? @file.join(dir_name, e) : e if @file.directory?(realdir(e_name)) - next if /\ACVS\z/ =~ e + next if /\A(?:CVS|\.svn)\z/ =~ e sub_suite = recursive_collect(e_name, already_gathered) sub_suites << sub_suite unless(sub_suite.empty?) else next if /~\z/ =~ e_name or /\A\.\#/ =~ e + next unless /\Atest_.*\.rb\z/m =~ e if @pattern and !@pattern.empty? next unless @pattern.any? {|pat| pat =~ e_name} end