diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2015-01-17 10:20:58 -0200 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2015-01-17 10:20:58 -0200 |
commit | 89eb1ae69b64197eccd0eae3a985184acbf4f9ac (patch) | |
tree | 27d7f354126973477531a8e2be22d110d9985985 /activesupport | |
parent | 9be89ab2157556aafcd86dc68eb135e3da698964 (diff) | |
parent | 9287790df81e6a3cb7fd9697c53b6a060dced154 (diff) | |
download | rails-89eb1ae69b64197eccd0eae3a985184acbf4f9ac.tar.gz rails-89eb1ae69b64197eccd0eae3a985184acbf4f9ac.tar.bz2 rails-89eb1ae69b64197eccd0eae3a985184acbf4f9ac.zip |
Merge pull request #18562 from vipulnsward/fix-broken-hwai-frozen-tet
Fix hwia isolated tests
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/test/core_ext/hash_ext_test.rb | 8 | ||||
-rw-r--r-- | activesupport/test/hash_with_indifferent_access_test.rb | 8 |
2 files changed, 9 insertions, 7 deletions
diff --git a/activesupport/test/core_ext/hash_ext_test.rb b/activesupport/test/core_ext/hash_ext_test.rb index 3d2f50ce49..e10bee5e00 100644 --- a/activesupport/test/core_ext/hash_ext_test.rb +++ b/activesupport/test/core_ext/hash_ext_test.rb @@ -1549,6 +1549,14 @@ class HashToXmlTest < ActiveSupport::TestCase assert_not_same hash_wia, hash_wia.with_indifferent_access end + + def test_allows_setting_frozen_array_values_with_indifferent_access + value = [1, 2, 3].freeze + hash = HashWithIndifferentAccess.new + hash[:key] = value + assert_equal hash[:key], value + 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 diff --git a/activesupport/test/hash_with_indifferent_access_test.rb b/activesupport/test/hash_with_indifferent_access_test.rb index 880457386e..1facd691fa 100644 --- a/activesupport/test/hash_with_indifferent_access_test.rb +++ b/activesupport/test/hash_with_indifferent_access_test.rb @@ -8,10 +8,4 @@ class HashWithIndifferentAccessTest < ActiveSupport::TestCase assert_equal :old_value, hash[:key] end - def test_frozen_value - value = [1, 2, 3].freeze - hash = {}.with_indifferent_access - hash[:key] = value - assert_equal hash[:key], value - end -end
\ No newline at end of file +end |