fix broken cache tests
This commit is contained in:
parent
34239cc511
commit
b784900208
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user