diff options
author | Douglas F Shearer <dougal.s@gmail.com> | 2009-05-07 23:58:07 +0100 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2009-05-11 11:45:57 -0700 |
commit | e1854e0b199fba352ddcaa58a3af168e8cc70e3a (patch) | |
tree | f9d528ae07f6ccdb5b469ad35fb2ffbfcf4a5a24 /activesupport/test | |
parent | d45d0a18647e906223b2859d1ce2a83be00095b1 (diff) | |
download | rails-e1854e0b199fba352ddcaa58a3af168e8cc70e3a.tar.gz rails-e1854e0b199fba352ddcaa58a3af168e8cc70e3a.tar.bz2 rails-e1854e0b199fba352ddcaa58a3af168e8cc70e3a.zip |
ActiveSupport::OrderedHash[1,2,3,4] creates an OrderedHash instead of a Hash.
[#2615 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/ordered_hash_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activesupport/test/ordered_hash_test.rb b/activesupport/test/ordered_hash_test.rb index 6fccbbdc41..647938dd87 100644 --- a/activesupport/test/ordered_hash_test.rb +++ b/activesupport/test/ordered_hash_test.rb @@ -162,4 +162,10 @@ class OrderedHashTest < Test::Unit::TestCase def test_inspect assert @ordered_hash.inspect.include?(@hash.inspect) end + + def test_alternate_initialization + alternate = ActiveSupport::OrderedHash[1,2,3,4] + assert_kind_of ActiveSupport::OrderedHash, alternate + assert_equal [1, 3], alternate.keys + end end |