type helper for class name

This commit is contained in:
Torsten Ruger 2018-07-14 11:03:16 +03:00
parent 61c840c023
commit 581f457119
2 changed files with 11 additions and 1 deletions

View File

@ -63,8 +63,12 @@ module Parfait
end
end
def class_name
@object_class.name
end
def to_s
"#{@object_class.name}-#{@names.inspect}"
"#{class_name}-#{@names.inspect}"
end
def method_names

View File

@ -72,5 +72,11 @@ module Parfait
type = @mess.get_type
assert_equal type , @mess.get_internal_word(0)
end
def test_to_s
assert @type.to_s.include?(@type.object_class.name.to_s)
end
def test_class_name
assert_equal :Message , @type.class_name
end
end
end