Skip to content

Commit 59f5022

Browse files
committed
Fix test
Followup to r62158 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1 parent 02d7ad9 commit 59f5022

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

test/ruby/test_system.rb

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -170,13 +170,9 @@ def test_system_exception
170170
assert_raise(Errno::ENOENT) do
171171
system('feature_14235', exception: true)
172172
end
173-
assert_raise(RuntimeError) do
173+
e = assert_raise(RuntimeError) do
174174
system("'#{ruby}' -e 'exit 1'", exception: true)
175175
end
176-
begin
177-
system("'#{ruby}' -e 'exit 1'", exception: true)
178-
rescue RuntimeError => e
179-
assert_equal true, e.message.include?('status (1)')
180-
end
176+
assert_match /\ACommand failed with exit 1:/, e.message
181177
end
182178
end

0 commit comments

Comments
 (0)