aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/core_ext/hash_ext_test.rb
diff options
context:
space:
mode:
authorEdward Tsech <edtsech@gmail.com>2012-05-11 12:09:57 +0200
committerEdward Tsech <edtsech@gmail.com>2012-05-11 14:09:55 +0200
commit21190f37f8b48bbb991aa7a6400ed4e20bb3768b (patch)
tree31e996bd3578e0c3d521998335c92d7d86dbb4e4 /activesupport/test/core_ext/hash_ext_test.rb
parent9b4514c3b8ecfbc40a44dbd4c2ebd4ce67f4a459 (diff)
downloadrails-21190f37f8b48bbb991aa7a6400ed4e20bb3768b.tar.gz
rails-21190f37f8b48bbb991aa7a6400ed4e20bb3768b.tar.bz2
rails-21190f37f8b48bbb991aa7a6400ed4e20bb3768b.zip
Test Hash#except can receive more than one argument.
Diffstat (limited to 'activesupport/test/core_ext/hash_ext_test.rb')
-rw-r--r--activesupport/test/core_ext/hash_ext_test.rb6
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