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
287 288 289 290 |
# File 'tests/testWIN32OLE.rb', line 287 def setup installer = WIN32OLE.new("WindowsInstaller.Installer") @record = installer.CreateRecord(2) end |
#test__invoke ⇒ Object
309 310 311 312 |
# File 'tests/testWIN32OLE.rb', line 309 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
304 305 306 307 |
# File 'tests/testWIN32OLE.rb', line 304 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
300 301 302 303 |
# File 'tests/testWIN32OLE.rb', line 300 def test_setproperty @record.setproperty( "StringData", 1, 'dddd') assert_equal('dddd', @record.StringData(1)) end |