diff --git a/ChangeLog b/ChangeLog index 54bd6a3a49..0f2ba38735 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Wed Feb 11 07:53:35 2015 Masaki Suketa + + * test/win32ole/test_word.rb: use skip method to skip test. + Tue Feb 10 11:38:28 2015 Shugo Maeda * vm_insnhelper.c (vm_call_method): stop method search when a method diff --git a/test/win32ole/test_word.rb b/test/win32ole/test_word.rb index acfa214913..a67b80bb76 100644 --- a/test/win32ole/test_word.rb +++ b/test/win32ole/test_word.rb @@ -26,20 +26,17 @@ def word_installed? end if defined?(WIN32OLE) - dotest = word_installed? - if !dotest - STDERR.puts("\n#{__FILE__} skipped(Microsoft Word not found.)") - end - if dotest - class TestWIN32OLE_WITH_WORD < Test::Unit::TestCase + class TestWIN32OLE_WITH_WORD < Test::Unit::TestCase + unless word_installed? + def test_dummy_for_skip_message + skip "Microsoft Word is not installed" + end + else def setup begin @obj = WIN32OLE.new('Word.Application') rescue WIN32OLERuntimeError @obj = nil - if !$skipped - $skipped = true - end end end @@ -48,7 +45,6 @@ if defined?(WIN32OLE) @obj.visible = true @obj.wordbasic.disableAutoMacros(true) assert(true) - else end end