summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorsorah <sorah@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-07-10 12:19:16 +0000
committersorah <sorah@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-07-10 12:19:16 +0000
commit7506a580fefcf89365d0480abfe47c6894117c0c (patch)
treecfbc323aba59e19ee71173bcc2e5aa9f6dad9a22 /lib
parent9cf9d5eaf7923498a3ece7f6757c9010aaa55e71 (diff)
* lib/test/unit.rb: Add new class variable `@@testfile_prefix`.
This is for changing test name prefix. (For testing) * test/testunit/tests_for_parallel/ptest_first.rb: Renamed from test_first.rb * test/testunit/tests_for_parallel/ptest_second.rb: Renamed from test_second.rb * test/testunit/tests_for_parallel/ptest_third.rb: Renamed from test_third.rb * test/testunit/tests_for_parallel/ptest_forth.rb: Renamed from test_forth.rb * test/testunit/tests_for_parallel/runner.rb: Remove misc.rb * test/testunit/tests_for_parallel/ptest_first.rb: ditto. * test/testunit/tests_for_parallel/ptest_second.rb: ditto. * test/testunit/tests_for_parallel/ptest_third.rb: ditto. * test/testunit/tests_for_parallel/ptest_forth.rb: ditto. * test/testunit/tests_for_parallel/misc.rb: Removed because no longer needed. * test/testunit/test_parallel.rb: Fix assertions for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/test/unit.rb4
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