aboutsummaryrefslogtreecommitdiffstats
path: root/test/win32ole
diff options
context:
space:
mode:
authorsuke <suke@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-09-13 13:24:59 +0000
committersuke <suke@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-09-13 13:24:59 +0000
commit98cc114fd87c12f5ab5a17022c2d3bb7a5dbfaf1 (patch)
tree38124fd906383e114b95baa28cbd225269614c07 /test/win32ole
parent4cdd9411e5af348d1adb1b71193245f31a224afb (diff)
downloadruby-98cc114fd87c12f5ab5a17022c2d3bb7a5dbfaf1.tar.gz
test/win32ole/test_word.rb: word quit without confirmation dialog to save
files. [Bug #13894] Thanks to h.shirosaki. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59867 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/win32ole')
-rw-r--r--test/win32ole/test_word.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/test/win32ole/test_word.rb b/test/win32ole/test_word.rb
index 03b0bcbdde..b1cdb273cc 100644
--- a/test/win32ole/test_word.rb
+++ b/test/win32ole/test_word.rb
@@ -8,17 +8,22 @@ rescue LoadError
end
require "test/unit"
+if defined?(WIN32OLE)
+ module Word; end
+end
+
def word_installed?
installed = false
w = nil
if defined?(WIN32OLE)
begin
w = WIN32OLE.new('Word.Application')
+ WIN32OLE.const_load(w, Word)
installed = true
rescue
ensure
if w
- w.quit
+ w.quit(Word::WdDoNotSaveChanges)
w = nil
end
end
@@ -59,7 +64,7 @@ if defined?(WIN32OLE)
def teardown
if @obj
- @obj.quit
+ @obj.quit(Word::WdDoNotSaveChanges)
@obj = nil
end
end