Permalink
Browse files

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'.
  • Loading branch information...
1 parent 1fab518 commit e11348063b1ff0149b8392ba455a7cefcddb5f39 @jfirebaugh jfirebaugh committed Jul 27, 2012
Showing with 1 addition and 5 deletions.
  1. +1 −5 activesupport/test/ordered_hash_test.rb
@@ -226,12 +226,8 @@ def test_alternate_initialization_with_array
end
def test_alternate_initialization_raises_exception_on_odd_length_args
- begin
+ assert_raises ArgumentError do
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

0 comments on commit e113480

Please sign in to comment.