summaryrefslogtreecommitdiff
path: root/test/win32ole/test_ole_methods.rb
diff options
context:
space:
mode:
authorsuke <suke@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-06-18 11:34:53 +0000
committersuke <suke@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-06-18 11:34:53 +0000
commit33311b653cca4bb3ac0b209f3b7ce23e3e4defb8 (patch)
tree2104687d399a05465b48543099e25e2e351184bf /test/win32ole/test_ole_methods.rb
parent20afef590bf76cb1a65eb327b7582cce3b3b0565 (diff)
support PROPERTYPUTREF. [ruby-talk:183042]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10316 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/win32ole/test_ole_methods.rb')
-rw-r--r--test/win32ole/test_ole_methods.rb36
1 files changed, 36 insertions, 0 deletions
diff --git a/test/win32ole/test_ole_methods.rb b/test/win32ole/test_ole_methods.rb
new file mode 100644
index 0000000..4b777a7
--- /dev/null
+++ b/test/win32ole/test_ole_methods.rb
@@ -0,0 +1,36 @@
+#
+# This is test for [ruby-talk:196897]
+#
+begin
+ require 'win32ole'
+rescue LoadError
+end
+require "test/unit"
+
+if defined?(WIN32OLE)
+ class TestWIN32OLE < Test::Unit::TestCase
+
+ def setup
+ @obj = WIN32OLE.new('Scripting.Dictionary')
+ end
+
+ def test_ole_methods
+ x = @obj.ole_methods.select {|m|
+ m.invoke_kind == 'PROPERTYPUTREF'
+ }
+ assert(x.size > 0)
+ assert_equal(1, x.size)
+ assert_equal('Item', x[0].name)
+ end
+
+ def test_ole_put_methods
+ x = @obj.ole_put_methods.select {|m|
+ m.invoke_kind == 'PROPERTYPUTREF'
+ }
+ assert(x.size > 0)
+ assert_equal(1, x.size)
+ assert_equal('Item', x[0].name)
+ end
+
+ end
+end