diff options
Diffstat (limited to 'ext/win32ole/tests/testOLETYPE.rb')
-rw-r--r-- | ext/win32ole/tests/testOLETYPE.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/ext/win32ole/tests/testOLETYPE.rb b/ext/win32ole/tests/testOLETYPE.rb index 9840aac940..d4eb1146e1 100644 --- a/ext/win32ole/tests/testOLETYPE.rb +++ b/ext/win32ole/tests/testOLETYPE.rb @@ -31,6 +31,15 @@ class TestOLETYPE < RUNIT::TestCase } assert(class_names.include?('Application')) end + + def test_class_to_s + classes = WIN32OLE_TYPE.ole_classes(MS_EXCEL_TYPELIB) + class_names = classes.collect{|c| + "#{c}" + } + assert(class_names.include?('Application')) + end + def test_ole_type classes = WIN32OLE_TYPE.ole_classes(MS_EXCEL_TYPELIB) app = classes.find {|c| c.name == 'Application'} @@ -80,4 +89,8 @@ class TestOLETYPE < RUNIT::TestCase worksheet = classes.find {|c| c.name == 'Worksheet'} assert_equal(131088, worksheet.helpcontext) end + def test_to_s + type = WIN32OLE_TYPE.new(MS_EXCEL_TYPELIB, 'Application') + assert_equal("Application", "#{type}"); + end end |