diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/test/unit.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/test/unit.rb b/lib/test/unit.rb index af67a7aabd..5aa9cb9a88 100644 --- a/lib/test/unit.rb +++ b/lib/test/unit.rb @@ -126,6 +126,8 @@ module Test module GlobOption include Options + @@testfile_prefix = "test" + def setup_options(parser, options) super parser.on '-b', '--basedir=DIR', 'Base directory of test suites.' do |dir| @@ -150,7 +152,7 @@ module Test next if f.empty? path = f end - if !(match = Dir["#{path}/**/test_*.rb"]).empty? + if !(match = Dir["#{path}/**/#{@@testfile_prefix}_*.rb"]).empty? if reject match.reject! {|n| n[(prefix.length+1)..-1] if prefix |