aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2012-10-11 18:26:41 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2012-10-11 18:26:52 -0700
commitb91a90e49606719a65fecd7c9d703f45df7b7f73 (patch)
tree352903649be7b23fca4caa255d6169ad1d108c83 /activesupport
parent9d24f1fc996078cfecd32771815e619b3255d132 (diff)
downloadrails-b91a90e49606719a65fecd7c9d703f45df7b7f73.tar.gz
rails-b91a90e49606719a65fecd7c9d703f45df7b7f73.tar.bz2
rails-b91a90e49606719a65fecd7c9d703f45df7b7f73.zip
adding a test for b21f24d9807bd161af947cf0f0cc440c9adffb73
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/test/caching_test.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/activesupport/test/caching_test.rb b/activesupport/test/caching_test.rb
index febf0eeeff..9f76f4c90b 100644
--- a/activesupport/test/caching_test.rb
+++ b/activesupport/test/caching_test.rb
@@ -3,6 +3,20 @@ require 'abstract_unit'
require 'active_support/cache'
class CacheKeyTest < ActiveSupport::TestCase
+ def test_entry_legacy_optional_ivars
+ legacy = Class.new(ActiveSupport::Cache::Entry) do
+ def initialize(value, options = {})
+ @value = value
+ @expires_in = nil
+ @created_at = nil
+ super
+ end
+ end
+
+ entry = legacy.new 'foo'
+ assert_equal 'foo', entry.value
+ end
+
def test_expand_cache_key
assert_equal '1/2/true', ActiveSupport::Cache.expand_cache_key([1, '2', true])
assert_equal 'name/1/2/true', ActiveSupport::Cache.expand_cache_key([1, '2', true], :name)