Class: TestWIN32OLE_FOR_PROPERTYPUTREF

Inherits:
Test::Unit::TestCase
  • Object
show all
Defined in:
tests/test_ole_methods.rb

Instance Method Summary collapse

Instance Method Details

#setupObject



13
14
15
# File 'tests/test_ole_methods.rb', line 13

def setup
  @obj = WIN32OLE.new('Scripting.Dictionary')
end

#test_ole_methodsObject



17
18
19
20
21
22
23
24
# File 'tests/test_ole_methods.rb', line 17

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

#test_ole_put_methodsObject



26
27
28
29
30
31
32
33
# File 'tests/test_ole_methods.rb', line 26

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