fix broken cache tests

This commit is contained in:
Brian Durand 2012-09-30 21:56:47 -07:00
parent 34239cc511
commit b784900208
2 changed files with 3 additions and 3 deletions

@ -591,9 +591,9 @@ def size
when NilClass
0
when String
value.bytesize
@v.bytesize
else
@s = Marshal.dump(value).bytesize
@s = Marshal.dump(@v).bytesize
end
end
end

@ -616,7 +616,7 @@ def test_log_exception_when_cache_read_fails
class MemoryStoreTest < ActiveSupport::TestCase
def setup
@record_size = Marshal.dump("aaaaaaaaaa").bytesize
@record_size = ActiveSupport::Cache::Entry.new("aaaaaaaaaa").size
@cache = ActiveSupport::Cache.lookup_store(:memory_store, :expires_in => 60, :size => @record_size * 10)
end