Class: TestWin32OLE_WITH_MSI
- Inherits:
-
RUNIT::TestCase
- Object
- RUNIT::TestCase
- TestWin32OLE_WITH_MSI
- Defined in:
- tests/testWIN32OLE.rb
Instance Method Summary collapse
- #setup ⇒ Object
- #test__invoke ⇒ Object
- #test_bracket_equal_with_arg ⇒ Object
-
#test_setproperty ⇒ Object
Sorry, this test fails.
Instance Method Details
#setup ⇒ Object
286 287 288 289 |
# File 'tests/testWIN32OLE.rb', line 286 def setup installer = WIN32OLE.new("WindowsInstaller.Installer") @record = installer.CreateRecord(2) end |
#test__invoke ⇒ Object
308 309 310 311 |
# File 'tests/testWIN32OLE.rb', line 308 def test__invoke shell=WIN32OLE.new('Shell.Application') assert_equal(shell.NameSpace(0).title, shell._invoke(0x60020002, [0], [WIN32OLE::VARIANT::VT_VARIANT]).title) end |
#test_bracket_equal_with_arg ⇒ Object
303 304 305 306 |
# File 'tests/testWIN32OLE.rb', line 303 def test_bracket_equal_with_arg @record[ "StringData", 1 ] = 'ffff' assert_equal('ffff', @record.StringData(1)) end |
#test_setproperty ⇒ Object
Sorry, this test fails. Win32OLE does not support this style to set property. Use Win32OLE#setproperty or Win32OLE#[]= . def test_invoke
@record.invoke("StringData", 1, 'cccc')
assert_equal('cccc', @record.StringData(1))
end
299 300 301 302 |
# File 'tests/testWIN32OLE.rb', line 299 def test_setproperty @record.setproperty( "StringData", 1, 'dddd') assert_equal('dddd', @record.StringData(1)) end |