diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2013-12-03 00:15:34 -0200 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2013-12-03 00:15:34 -0200 |
commit | c48a0cac626b4e32d7abfa9f4f1fae16568157d9 (patch) | |
tree | 27b92e5f814ecaea9b5f11f0f5f9723a5ee9f63d /activesupport/test/core_ext | |
parent | 2ebf47aea21ff8ac10681e53e78dd7a0e5c31c6e (diff) | |
download | rails-c48a0cac626b4e32d7abfa9f4f1fae16568157d9.tar.gz rails-c48a0cac626b4e32d7abfa9f4f1fae16568157d9.tar.bz2 rails-c48a0cac626b4e32d7abfa9f4f1fae16568157d9.zip |
Tidy up previous commit, fix message assertion and improve tests
Diffstat (limited to 'activesupport/test/core_ext')
-rw-r--r-- | activesupport/test/core_ext/hash_ext_test.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/activesupport/test/core_ext/hash_ext_test.rb b/activesupport/test/core_ext/hash_ext_test.rb index f62efecc72..1ee9fbf46e 100644 --- a/activesupport/test/core_ext/hash_ext_test.rb +++ b/activesupport/test/core_ext/hash_ext_test.rb @@ -624,10 +624,15 @@ class HashExtTest < ActiveSupport::TestCase { :failure => "stuff", :funny => "business" }.assert_valid_keys(:failure, :funny) end - assert_raise(ArgumentError, "Unknown key: :failore. Valid keys are: :failure, :funny") do + exception = assert_raise ArgumentError do { :failore => "stuff", :funny => "business" }.assert_valid_keys([ :failure, :funny ]) + end + assert_equal "Unknown key: :failore. Valid keys are: :failure, :funny", exception.message + + exception = assert_raise ArgumentError do { :failore => "stuff", :funny => "business" }.assert_valid_keys(:failure, :funny) end + assert_equal "Unknown key: :failore. Valid keys are: :failure, :funny", exception.message end def test_assorted_keys_not_stringified |