2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-11 21:04:42 +08:00

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

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