1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Test for [Feature #16832]

This commit is contained in:
Nobuyoshi Nakada 2020-05-26 15:09:07 +09:00
parent 385ac07fd8
commit 7d5da30c9e
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6

View file

@ -57,6 +57,19 @@ class TestNameError < Test::Unit::TestCase
assert_equal(:X, e.name)
end
def test_info_const_name
mod = Module.new do
def self.name
"ModuleName"
end
def self.inspect
raise "<unusable info>"
end
end
assert_raise_with_message(NameError, /ModuleName/) {mod::DOES_NOT_EXIST}
end
def test_info_method
obj = PrettyObject.new