Fix "Relax expectations of errors from getgrnam
"
Use `assert_raise_kind_of` instead of `assert_raise`, that rejects sub classes of the given exceptions.
This commit is contained in:
parent
4138b187dc
commit
96a5da6786
Notes:
git
2025-01-24 08:55:39 +00:00
@ -1693,7 +1693,7 @@ class TestProcess < Test::Unit::TestCase
|
||||
if g = Etc.getgrgid(Process.gid)
|
||||
assert_equal(Process.gid, Process::GID.from_name(g.name), g.name)
|
||||
end
|
||||
exc = assert_raise(ArgumentError, SystemCallError) do
|
||||
exc = assert_raise_kind_of(ArgumentError, SystemCallError) do
|
||||
Process::GID.from_name("\u{4e0d 5b58 5728}") # fu son zai ("absent" in Kanji)
|
||||
end
|
||||
assert_match(/\u{4e0d 5b58 5728}/, exc.message) if exc.is_a?(ArgumentError)
|
||||
|
Loading…
x
Reference in New Issue
Block a user