Update some tests for the new message format of NoMethodError
This commit is contained in:
parent
1fd181b453
commit
8f868a1a65
Notes:
git
2023-02-20 01:33:35 +00:00
@ -3281,7 +3281,7 @@ class TestModule < Test::Unit::TestCase
|
||||
methods = singleton_class.private_instance_methods(false)
|
||||
assert_include(methods, :#{method}, ":#{method} should be private")
|
||||
|
||||
assert_raise_with_message(NoMethodError, "private method `#{method}' called for main:Object") {
|
||||
assert_raise_with_message(NoMethodError, /^private method `#{method}' called for /) {
|
||||
recv = self
|
||||
recv.#{method}
|
||||
}
|
||||
|
@ -85,7 +85,7 @@ class TestNoMethodError < Test::Unit::TestCase
|
||||
bug3237 = '[ruby-core:29948]'
|
||||
str = "\u2600"
|
||||
id = :"\u2604"
|
||||
msg = "undefined method `#{id}' for \"#{str}\":String"
|
||||
msg = "undefined method `#{id}' for an instance of String"
|
||||
assert_raise_with_message(NoMethodError, Regexp.compile(Regexp.quote(msg)), bug3237) do
|
||||
str.__send__(id)
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user