summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--test/win32ole/test_word.rb16
2 files changed, 10 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index 54bd6a3..0f2ba38 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Wed Feb 11 07:53:35 2015 Masaki Suketa <masaki.suketa@nifty.ne.jp>
+
+ * test/win32ole/test_word.rb: use skip method to skip test.
+
Tue Feb 10 11:38:28 2015 Shugo Maeda <shugo@ruby-lang.org>
* 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 acfa214..a67b80b 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