aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/core_ext
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2010-04-22 10:07:33 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2010-04-22 10:07:33 -0700
commitc976784381d694df8090ad8a16c2648e93a2bd12 (patch)
tree593e9bf887e2ffc904b8f00914ba5fdab65154fe /activesupport/test/core_ext
parentd692e6be3091dd114afa0cce2778787d3af93e83 (diff)
downloadrails-c976784381d694df8090ad8a16c2648e93a2bd12.tar.gz
rails-c976784381d694df8090ad8a16c2648e93a2bd12.tar.bz2
rails-c976784381d694df8090ad8a16c2648e93a2bd12.zip
Change HWIA#stringify_keys to return a HWIA not a Hash
Diffstat (limited to 'activesupport/test/core_ext')
-rw-r--r--activesupport/test/core_ext/hash_ext_test.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/activesupport/test/core_ext/hash_ext_test.rb b/activesupport/test/core_ext/hash_ext_test.rb
index 1dcde4b665..b2a9731578 100644
--- a/activesupport/test/core_ext/hash_ext_test.rb
+++ b/activesupport/test/core_ext/hash_ext_test.rb
@@ -61,6 +61,7 @@ class HashExtTest < Test::Unit::TestCase
end
def test_symbolize_keys_for_hash_with_indifferent_access
+ assert_instance_of Hash, @symbols.with_indifferent_access.symbolize_keys
assert_equal @symbols, @symbols.with_indifferent_access.symbolize_keys
assert_equal @symbols, @strings.with_indifferent_access.symbolize_keys
assert_equal @symbols, @mixed.with_indifferent_access.symbolize_keys
@@ -83,12 +84,14 @@ class HashExtTest < Test::Unit::TestCase
end
def test_stringify_keys_for_hash_with_indifferent_access
+ assert_instance_of ActiveSupport::HashWithIndifferentAccess, @symbols.with_indifferent_access.stringify_keys
assert_equal @strings, @symbols.with_indifferent_access.stringify_keys
assert_equal @strings, @strings.with_indifferent_access.stringify_keys
assert_equal @strings, @mixed.with_indifferent_access.stringify_keys
end
def test_stringify_keys_bang_for_hash_with_indifferent_access
+ assert_instance_of ActiveSupport::HashWithIndifferentAccess, @symbols.with_indifferent_access.dup.stringify_keys!
assert_equal @strings, @symbols.with_indifferent_access.dup.stringify_keys!
assert_equal @strings, @strings.with_indifferent_access.dup.stringify_keys!
assert_equal @strings, @mixed.with_indifferent_access.dup.stringify_keys!