Class: TestWIN32OLE_WITH_WORD

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

Instance Method Summary collapse

Instance Method Details

#setupObject



13
14
15
16
17
18
19
# File 'tests/test_word.rb', line 13

def setup
  begin
    @obj = WIN32OLE.new('Word.Application')
  rescue WIN32OLERuntimeError
    @obj = nil
  end
end

#teardownObject



29
30
31
32
33
34
# File 'tests/test_word.rb', line 29

def teardown
  if @obj
    @obj.quit
    @obj = nil
  end
end

#test_ole_methodsObject



21
22
23
24
25
26
27
# File 'tests/test_word.rb', line 21

def test_ole_methods
  if @obj
    @obj.visible = true
    @obj.wordbasic.disableAutoMacros(true)
    assert(true)
  end
end