Permalink
Browse files

adding a test for b21f24d

  • Loading branch information...
1 parent 9d24f1f commit b91a90e49606719a65fecd7c9d703f45df7b7f73 @tenderlove tenderlove committed Oct 12, 2012
Showing with 14 additions and 0 deletions.
  1. +14 −0 activesupport/test/caching_test.rb
@@ -3,6 +3,20 @@
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)

0 comments on commit b91a90e

Please sign in to comment.