Clear the cache after each test otherwise we are leaking state.

This commit is contained in:
Guo Xiang Tan 2017-07-24 11:41:37 +09:00
parent 6593f0355f
commit 381a2a55be
1 changed files with 4 additions and 1 deletions

View File

@ -1,11 +1,14 @@
require 'rails_helper'
describe ApplicationRequest do
before do
ApplicationRequest.clear_cache!
end
after do
ApplicationRequest.clear_cache!
end
def inc(key,opts=nil)
ApplicationRequest.increment!(key,opts)
end