aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/core_ext/hash_ext_test.rb
diff options
context:
space:
mode:
authorDavid Lee <davidomundo@gmail.com>2011-05-17 03:01:31 -0700
committerDavid Lee <davidomundo@gmail.com>2011-05-17 03:01:31 -0700
commit94617d7da1e76daeae3a05c61b42321163f93d62 (patch)
tree7da2c0aab714b2a04489ff13bb3755a0a8f20931 /activesupport/test/core_ext/hash_ext_test.rb
parentb0385fe1b2a147d982eadbeb716dd1c7598a93e0 (diff)
downloadrails-94617d7da1e76daeae3a05c61b42321163f93d62.tar.gz
rails-94617d7da1e76daeae3a05c61b42321163f93d62.tar.bz2
rails-94617d7da1e76daeae3a05c61b42321163f93d62.zip
Optimize parts of HashWithIndifferentAccess
Diffstat (limited to 'activesupport/test/core_ext/hash_ext_test.rb')
-rw-r--r--activesupport/test/core_ext/hash_ext_test.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/activesupport/test/core_ext/hash_ext_test.rb b/activesupport/test/core_ext/hash_ext_test.rb
index 4557a10688..b2c85f15cb 100644
--- a/activesupport/test/core_ext/hash_ext_test.rb
+++ b/activesupport/test/core_ext/hash_ext_test.rb
@@ -971,6 +971,11 @@ class HashToXmlTest < Test::Unit::TestCase
assert_nil hash_wia.default
end
+ def test_should_return_self_for_with_indifferent_access
+ hash_wia = HashWithIndifferentAccess.new
+ assert_equal hash_wia, hash_wia.with_indifferent_access
+ end
+
def test_should_copy_the_default_value_when_converting_to_hash_with_indifferent_access
hash = Hash.new(3)
hash_wia = hash.with_indifferent_access