зеркало из https://github.com/github/ruby.git
Update some tests for the new message format of NoMethodError
This commit is contained in:
Родитель
1fd181b453
Коммит
8f868a1a65
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче