diff options
author | Erich Menge <erich.menge@me.com> | 2012-03-11 23:21:37 -0500 |
---|---|---|
committer | Erich Menge <erich.menge@me.com> | 2012-03-12 12:29:30 -0500 |
commit | be623677a3b05696e70518072576588cbeaf83cd (patch) | |
tree | 68fddc34e037dce6fa00808a0760e00d0ef63fcb /activesupport/test | |
parent | 6c0d5a19a4e97be3d004997f6547ec19e6a22363 (diff) | |
download | rails-be623677a3b05696e70518072576588cbeaf83cd.tar.gz rails-be623677a3b05696e70518072576588cbeaf83cd.tar.bz2 rails-be623677a3b05696e70518072576588cbeaf83cd.zip |
Allow retrieve_cache_key to work on collections such as ActiveRecord::Relation.
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/caching_test.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activesupport/test/caching_test.rb b/activesupport/test/caching_test.rb index b03865da93..ba027f1ff0 100644 --- a/activesupport/test/caching_test.rb +++ b/activesupport/test/caching_test.rb @@ -69,6 +69,10 @@ class CacheKeyTest < ActiveSupport::TestCase def test_expand_cache_key_of_true assert_equal 'true', ActiveSupport::Cache.expand_cache_key(true) end + + def test_expand_cache_key_of_array_like_object + assert_equal 'foo/bar/baz', ActiveSupport::Cache.expand_cache_key(%w{foo bar baz}.to_enum) + end end class CacheStoreSettingTest < ActiveSupport::TestCase |