summaryrefslogtreecommitdiff
path: root/test/win32ole/test_win32ole_variant.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/win32ole/test_win32ole_variant.rb')
-rw-r--r--test/win32ole/test_win32ole_variant.rb8
1 files changed, 2 insertions, 6 deletions
diff --git a/test/win32ole/test_win32ole_variant.rb b/test/win32ole/test_win32ole_variant.rb
index 9583a01..27ede7d 100644
--- a/test/win32ole/test_win32ole_variant.rb
+++ b/test/win32ole/test_win32ole_variant.rb
@@ -36,14 +36,10 @@ if defined?(WIN32OLE_VARIANT)
end
def test_s_new_no_argument
- ex = nil
- begin
+ pat = /wrong number of arguments \(.*\b0\b.* 1\.\.3\)/
+ assert_raise_with_message(ArgumentError, pat) do
WIN32OLE_VARIANT.new
- rescue ArgumentError
- ex = $!
end
- assert_instance_of(ArgumentError, ex)
- assert_equal("wrong number of arguments (0 for 1..3)", ex.message);
end
def test_s_new_one_argument