summaryrefslogtreecommitdiff
path: root/ext/win32ole/tests/testOLETYPE.rb
diff options
context:
space:
mode:
authorsuke <suke@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-05-17 13:49:08 +0000
committersuke <suke@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-05-17 13:49:08 +0000
commit7e190d7568c93e0f0d5397629f426780d608016c (patch)
treed91499325f88d04feb5551bc5263613f8525bfaf /ext/win32ole/tests/testOLETYPE.rb
parent8d67caddea374eee9f95a127767a55dd1626bd4b (diff)
add WIN32OLE_TYPE#to_s method.
add WIN32OLE_VARIABLE#to_s method. add WIN32OLE_METHOD#to_s method. add WIN32OLE_PARAM#to_s method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/win32ole/tests/testOLETYPE.rb')
-rw-r--r--ext/win32ole/tests/testOLETYPE.rb13
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