diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/testunit/test_parallel.rb | 11 | ||||
-rw-r--r-- | test/testunit/tests_for_parallel/test_third.rb | 2 |
2 files changed, 10 insertions, 3 deletions
diff --git a/test/testunit/test_parallel.rb b/test/testunit/test_parallel.rb index 2f114bba69..7a2e9aece6 100644 --- a/test/testunit/test_parallel.rb +++ b/test/testunit/test_parallel.rb @@ -140,8 +140,15 @@ module TestParallel end end - #def test_childs - #end + def test_ignore_jzero + @test_out, o = IO.pipe + @test_pid = spawn(*@options[:ruby], TESTS+"/runner.rb", + "-j","0", out: File::NULL, err: o) + o.close + timeout(10) { + assert_match(/Error: parameter of -j option should be greater than 0/,@test_out.read) + } + end def test_should_run_all_without_any_leaks spawn_runner diff --git a/test/testunit/tests_for_parallel/test_third.rb b/test/testunit/tests_for_parallel/test_third.rb index 16bac16a04..2746a9ba71 100644 --- a/test/testunit/tests_for_parallel/test_third.rb +++ b/test/testunit/tests_for_parallel/test_third.rb @@ -3,7 +3,7 @@ require_relative "misc.rb" class TestD < TestCaseForParallelTest def ptest_fail_at_worker - if MiniTest::Unit.output != STDOUT + if /test\/unit\/parallel\.rb/ =~ $0 assert_equal(0,1) end end |