diff options
author | Edward Tsech <edtsech@gmail.com> | 2012-05-11 12:09:57 +0200 |
---|---|---|
committer | Edward Tsech <edtsech@gmail.com> | 2012-05-11 14:09:55 +0200 |
commit | 21190f37f8b48bbb991aa7a6400ed4e20bb3768b (patch) | |
tree | 31e996bd3578e0c3d521998335c92d7d86dbb4e4 /activesupport | |
parent | 9b4514c3b8ecfbc40a44dbd4c2ebd4ce67f4a459 (diff) | |
download | rails-21190f37f8b48bbb991aa7a6400ed4e20bb3768b.tar.gz rails-21190f37f8b48bbb991aa7a6400ed4e20bb3768b.tar.bz2 rails-21190f37f8b48bbb991aa7a6400ed4e20bb3768b.zip |
Test Hash#except can receive more than one argument.
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/test/core_ext/hash_ext_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activesupport/test/core_ext/hash_ext_test.rb b/activesupport/test/core_ext/hash_ext_test.rb index 1cd10eb6e2..afca636777 100644 --- a/activesupport/test/core_ext/hash_ext_test.rb +++ b/activesupport/test/core_ext/hash_ext_test.rb @@ -500,6 +500,12 @@ class HashExtTest < ActiveSupport::TestCase assert_equal expected, original end + def test_except_with_more_than_one_argument + original = { :a => 'x', :b => 'y', :c => 10 } + expected = { :a => 'x' } + assert_equal expected, original.except(:b, :c) + end + def test_except_with_original_frozen original = { :a => 'x', :b => 'y' } original.freeze |