Isolate each specs for cache store (#6450)
The cache store is explicitly used by some specs, but they were not isolated and therefore not reliable. This fixes the issue by clearing the cache after each specs.
This commit is contained in:
parent
a71af98401
commit
9b8a448477
4 changed files with 17 additions and 14 deletions
|
@ -51,6 +51,8 @@ RSpec.configure do |config|
|
|||
end
|
||||
|
||||
config.after :each do
|
||||
Rails.cache.clear
|
||||
|
||||
keys = Redis.current.keys
|
||||
Redis.current.del(keys) if keys.any?
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue