aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2011-09-03 01:25:44 -0700
committerJosé Valim <jose.valim@gmail.com>2011-09-03 01:25:44 -0700
commitd50c0acc95d9ac9b258594c7d68e1eeef9b6d41e (patch)
tree635b66122692178c86cdbf3560d752f7eb757f85 /activesupport/test
parent5912ed99029f76b3ec51955f05323b77fa0b22f2 (diff)
parent9984266c041e1079a09140f9307fc1ca13858988 (diff)
downloadrails-d50c0acc95d9ac9b258594c7d68e1eeef9b6d41e.tar.gz
rails-d50c0acc95d9ac9b258594c7d68e1eeef9b6d41e.tar.bz2
rails-d50c0acc95d9ac9b258594c7d68e1eeef9b6d41e.zip
Merge pull request #2827 from sikachu/extractable_ordered_hash
Make `ActiveSupport::OrderedHash` extractable when using `Array#extract_options!
Diffstat (limited to 'activesupport/test')
-rw-r--r--activesupport/test/ordered_hash_test.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/activesupport/test/ordered_hash_test.rb b/activesupport/test/ordered_hash_test.rb
index bf851dbcbc..0b5f912dc4 100644
--- a/activesupport/test/ordered_hash_test.rb
+++ b/activesupport/test/ordered_hash_test.rb
@@ -329,4 +329,9 @@ class OrderedHashTest < Test::Unit::TestCase
assert_equal expected, @ordered_hash.invert
assert_equal @values.zip(@keys), @ordered_hash.invert.to_a
end
+
+ def test_extractable
+ @ordered_hash[:rails] = "snowman"
+ assert_equal @ordered_hash, [1, 2, @ordered_hash].extract_options!
+ end
end