summaryrefslogtreecommitdiff
path: root/ruby
diff options
context:
space:
mode:
authorRuss Allbery <eagle@eyrie.org>2014-01-06 11:49:00 -0800
committerRuss Allbery <rra@stanford.edu>2014-01-06 12:25:18 -0800
commit827e8a3b9b358513e7cb3988ea741dee5272275d (patch)
treee4279e4af65e684351b5f460d6ebaa1951683795 /ruby
parent530fa51c84fddd82d5218a81d40ddd2248bde503 (diff)
Update Ruby test expectations for Ruby 1.9
Current versions of Ruby 1.9 now throw different exceptions in several places than we had previously expected. Allow both the old and new exceptions. Change-Id: I4f20e72c65f788aebacdce6831301f9e6f2b1c0a Reviewed-on: https://gerrit.stanford.edu/1365 Reviewed-by: Russ Allbery <rra@stanford.edu> Tested-by: Russ Allbery <rra@stanford.edu>
Diffstat (limited to 'ruby')
-rw-r--r--ruby/test_remctl.rb.in10
1 files changed, 6 insertions, 4 deletions
diff --git a/ruby/test_remctl.rb.in b/ruby/test_remctl.rb.in
index 574a69b..176e9a8 100644
--- a/ruby/test_remctl.rb.in
+++ b/ruby/test_remctl.rb.in
@@ -142,8 +142,8 @@ class TC_RemctlSimple < Test::Unit::TestCase
raise
end
end
- assert_raise ArgumentError do Remctl.default_port = 'foo' end
- assert_raise ArgumentError do Remctl.default_port = -1 end
+ assert_raise ArgumentError, TypeError do Remctl.default_port = 'foo' end
+ assert_raise ArgumentError, RangeError do Remctl.default_port = -1 end
assert_raise ArgumentError do
begin
Remctl.default_port = 65536
@@ -260,9 +260,11 @@ class TC_RemctlFull < Test::Unit::TestCase
unless configured? then return end
assert_raise ArgumentError do Remctl.new end
assert_raise TypeError do Remctl.new(1, 14373, @principal) end
- assert_raise ArgumentError do Remctl.new('localhost', 'foo', @principal) end
+ assert_raise ArgumentError, TypeError do
+ Remctl.new('localhost', 'foo', @principal)
+ end
assert_raise TypeError do Remctl.new('localhost', 14373, 1) end
- assert_raise ArgumentError do Remctl.new('localhost', -1) end
+ assert_raise ArgumentError, RangeError do Remctl.new('localhost', -1) end
assert_raise ArgumentError do Remctl.new('localhost', 65536) end
assert_raise Remctl::Error do
begin