mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Use random tmp dir for FileStoreTest
This commit is contained in:
parent
ce4c26cf88
commit
2afc230053
1 changed files with 3 additions and 4 deletions
|
@ -6,7 +6,10 @@ require_relative "../behaviors"
|
|||
require "pathname"
|
||||
|
||||
class FileStoreTest < ActiveSupport::TestCase
|
||||
attr_reader :cache_dir
|
||||
|
||||
def setup
|
||||
@cache_dir = Dir.mktmpdir("file-store-")
|
||||
Dir.mkdir(cache_dir) unless File.exist?(cache_dir)
|
||||
@cache = ActiveSupport::Cache.lookup_store(:file_store, cache_dir, expires_in: 60)
|
||||
@peek = ActiveSupport::Cache.lookup_store(:file_store, cache_dir, expires_in: 60)
|
||||
|
@ -21,10 +24,6 @@ class FileStoreTest < ActiveSupport::TestCase
|
|||
rescue Errno::ENOENT
|
||||
end
|
||||
|
||||
def cache_dir
|
||||
File.join(Dir.pwd, "tmp_cache")
|
||||
end
|
||||
|
||||
include CacheStoreBehavior
|
||||
include CacheStoreVersionBehavior
|
||||
include LocalCacheBehavior
|
||||
|
|
Loading…
Reference in a new issue