From 59f502295fb48b6a7ef6c2f9a36cb7d1efeabb18 Mon Sep 17 00:00:00 2001 From: kazu Date: Fri, 2 Feb 2018 11:21:12 +0000 Subject: Fix test Followup to r62158 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_system.rb | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'test/ruby') diff --git a/test/ruby/test_system.rb b/test/ruby/test_system.rb index 0c0ad33fb6..af80009fea 100644 --- a/test/ruby/test_system.rb +++ b/test/ruby/test_system.rb @@ -170,13 +170,9 @@ class TestSystem < Test::Unit::TestCase assert_raise(Errno::ENOENT) do system('feature_14235', exception: true) end - assert_raise(RuntimeError) do + e = assert_raise(RuntimeError) do system("'#{ruby}' -e 'exit 1'", exception: true) end - begin - system("'#{ruby}' -e 'exit 1'", exception: true) - rescue RuntimeError => e - assert_equal true, e.message.include?('status (1)') - end + assert_match /\ACommand failed with exit 1:/, e.message end end -- cgit v1.2.3