diff options
Diffstat (limited to 'test/win32ole')
-rw-r--r-- | test/win32ole/test_win32ole.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/win32ole/test_win32ole.rb b/test/win32ole/test_win32ole.rb index df33acb94f..81182372dc 100644 --- a/test/win32ole/test_win32ole.rb +++ b/test/win32ole/test_win32ole.rb @@ -39,6 +39,23 @@ if defined?(WIN32OLE) } end + def test_raise_message + exc = assert_raise(WIN32OLERuntimeError) { + @dict1.add + } + assert_match(/^\(in OLE method `add': \)/, exc.message) + + exc = assert_raise(WIN32OLERuntimeError) { + @dict1._invoke(1, [], []) + } + assert_match(/^\(in OLE method `<dispatch id:1>': \)/, exc.message) + + exc = assert_raise(WIN32OLERuntimeError) { + @dict1.compareMode = 100 + } + assert_match(/^\(in setting property `compareMode': \)/, exc.message) + end + def test_ole_methods methods = @dict1.ole_methods mnames = methods.collect {|m| |