summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorsuke <suke@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-02-10 22:54:39 (GMT)
committersuke <suke@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-02-10 22:54:39 (GMT)
commit11ac08676d0505e79663fe01c274e37df1d41408 (patch)
tree97eb18f9f82c5aba3d3f90d15408e361c909f815 /test
parent193ad64359b8ebcd77a2cba50a62d64311e26b22 (diff)
* test/win32ole/test_word.rb: use skip method to skip test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49560 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/win32ole/test_word.rb16
1 files changed, 6 insertions, 10 deletions
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