mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Test Hash#except can receive more than one argument.
This commit is contained in:
parent
9b4514c3b8
commit
21190f37f8
1 changed files with 6 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue