ruby-changes:50042
From: kazu <ko1@a...>
Date: Fri, 2 Feb 2018 20:21:17 +0900 (JST)
Subject: [ruby-changes:50042] kazu:r62160 (trunk): Fix test
kazu 2018-02-02 20:21:12 +0900 (Fri, 02 Feb 2018) New Revision: 62160 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=62160 Log: Fix test Followup to r62158 Modified files: trunk/test/ruby/test_system.rb Index: test/ruby/test_system.rb =================================================================== --- test/ruby/test_system.rb (revision 62159) +++ test/ruby/test_system.rb (revision 62160) @@ -170,13 +170,9 @@ class TestSystem < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_system.rb#L170 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/