[rubygems/rubygems] Escape regexp metachacters or use assert_include

6d445a85d7
This commit is contained in:
Nobuyoshi Nakada 2023-06-16 23:55:47 +09:00 committed by git
parent af66b9b720
commit 10e4a9a5c2
6 changed files with 18 additions and 17 deletions

View file

@ -1254,8 +1254,8 @@ class TestGem < Gem::TestCase
Gem.try_activate "a_file"
end
assert_match(/Could not find 'b' /, e.message)
assert_match(/at: #{a.spec_file}/, e.message)
assert_include(e.message, "Could not find 'b' ")
assert_include(e.message, "at: #{a.spec_file}")
end
def test_self_try_activate_missing_prerelease