1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Don't test language-level exception messages

Ruby implementations should be free to produce exception
messages that are not identical to MRI. For example,
Rubinius produces 'Expected an even number, got 5'.
This commit is contained in:
John Firebaugh 2012-07-27 12:50:21 -07:00
parent 1fab518c6a
commit e11348063b

View file

@ -226,12 +226,8 @@ class OrderedHashTest < ActiveSupport::TestCase
end end
def test_alternate_initialization_raises_exception_on_odd_length_args def test_alternate_initialization_raises_exception_on_odd_length_args
begin assert_raises ArgumentError do
ActiveSupport::OrderedHash[1,2,3,4,5] ActiveSupport::OrderedHash[1,2,3,4,5]
flunk "Hash::[] should have raised an exception on initialization " +
"with an odd number of parameters"
rescue ArgumentError => e
assert_equal "odd number of arguments for Hash", e.message
end end
end end