Assert warnings message for the last argument is keyword parameter.

This commit is contained in:
Hiroshi SHIBATA 2019-09-26 18:07:17 +09:00
parent a2af473018
commit d4a86e407e
No known key found for this signature in database
GPG Key ID: F9CF13417264FAC2

View File

@ -524,11 +524,11 @@ class TestGemRequire < Gem::TestCase
_, err = capture_subprocess_io do
system(@@ruby, "-w", "-rpp", "--disable=gems", "-I", lib, "-C", dir, "-I.", "main.rb")
end
assert_equal "{:x=>1}\n{:y=>2}\n", err
assert_match /main.rb:1: warning: The last argument is used as the keyword parameter/, err
_, err = capture_subprocess_io do
system(@@ruby, "-w", "-rpp", "--enable=gems", "-I", lib, "-C", dir, "-I.", "main.rb")
end
assert_equal "{:x=>1}\n{:y=>2}\n", err
assert_match /main.rb:1: warning: The last argument is used as the keyword parameter/, err
end
end
end