aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2012-07-27 12:50:21 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2012-07-27 12:51:12 -0700
commite11348063b1ff0149b8392ba455a7cefcddb5f39 (patch)
tree62008c9b36159fac32af16afb1b5ec2ce0760c70
parent1fab518c6a75dac5773654646eb724a59741bc13 (diff)
downloadrails-e11348063b1ff0149b8392ba455a7cefcddb5f39.tar.gz
rails-e11348063b1ff0149b8392ba455a7cefcddb5f39.tar.bz2
rails-e11348063b1ff0149b8392ba455a7cefcddb5f39.zip
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'.
-rw-r--r--activesupport/test/ordered_hash_test.rb6
1 files changed, 1 insertions, 5 deletions
diff --git a/activesupport/test/ordered_hash_test.rb b/activesupport/test/ordered_hash_test.rb
index e8defd396b..ac85ba1f21 100644
--- a/activesupport/test/ordered_hash_test.rb
+++ b/activesupport/test/ordered_hash_test.rb
@@ -226,12 +226,8 @@ class OrderedHashTest < ActiveSupport::TestCase
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