summaryrefslogtreecommitdiff
path: root/test/win32ole/test_propertyputref.rb
diff options
context:
space:
mode:
authorsuke <suke@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-08-06 11:37:22 +0000
committersuke <suke@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-08-06 11:37:22 +0000
commitf4a3bcbff05afe3062784af3de4005cd95aac0d8 (patch)
tree4b1dba924a605bde97da95175fca6b59d5faacc0 /test/win32ole/test_propertyputref.rb
parentae421c43dfda6e9a1e9af1edaa649a3de17ff07a (diff)
fix test of PROPERTYPUT_REF in some environment
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12888 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/win32ole/test_propertyputref.rb')
-rw-r--r--test/win32ole/test_propertyputref.rb11
1 files changed, 9 insertions, 2 deletions
diff --git a/test/win32ole/test_propertyputref.rb b/test/win32ole/test_propertyputref.rb
index 4d34025..62f36c2 100644
--- a/test/win32ole/test_propertyputref.rb
+++ b/test/win32ole/test_propertyputref.rb
@@ -9,16 +9,23 @@ if defined?(WIN32OLE)
def setup
begin
@sapi = WIN32OLE.new('SAPI.SpVoice')
+ @sv = @sapi.voice
+ puts @sv
rescue WIN32OLERuntimeError
@sapi = nil
end
end
def test_sapi
if @sapi
- new_id = @sapi.getvoices.item(2).Id
- @sapi.voice = @sapi.getvoices.item(2)
+ new_id = @sapi.getvoices.item(0).Id
+ @sapi.voice = @sapi.getvoices.item(0)
assert_equal(new_id, @sapi.voice.Id)
end
end
+ def teardown
+ if @sapi
+ @sapi.voice = @sv
+ end
+ end
end
end