1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/test/win32ole/test_win32ole_param_event.rb
suke 06e1079d93 remove Microsoft Internet Control
* test/win32ole/test_win32ole_param: remove Microsoft Internet Control.
* test/win32ole/test_win32ole_param_event: use ADODB instead of
  Microsoft Internet Control for test_input?, test_output?

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65046 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-13 00:21:59 +00:00

44 lines
944 B
Ruby

begin
require 'win32ole'
rescue LoadError
end
require 'test/unit'
if defined?(WIN32OLE_PARAM)
def ado_installed?
installed = false
if defined?(WIN32OLE)
begin
WIN32OLE.new('ADODB.Connection')
installed = true
rescue
end
end
installed
end
class TestWIN32OLE_PARAM_EVENT < Test::Unit::TestCase
unless ado_installed?
def test_dummy_for_skip_message
skip 'ActiveX Data Object Library not found'
end
else
def setup
typelib = WIN32OLE.new('ADODB.Connection').ole_typelib
otype = WIN32OLE_TYPE.new(typelib.name, 'Connection')
m_will_connect = WIN32OLE_METHOD.new(otype, 'WillConnect')
@param_user_id = m_will_connect.params[0]
end
def test_input?
assert_equal(true, @param_user_id.input?)
end
def test_output?
assert_equal(true, @param_user_id.output?)
end
end
end
end