Closed Lockyy closed 5 years ago
@@ master #114 diff @@
==========================================
Files 11 11
Lines 336 336
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
Hits 327 327
Misses 9 9
Partials 0 0
Powered by Codecov. Last updated by afaffce...5f92ed6
It should probably also say something about adding Rails.cache.clear to your after(:each) or teardown in your specs/tests. Or suggest :null_store for tests
The default caching system in rails is
ActiveSupport::Cache::FileStore
. This means that cached values are shared between development and test environments as well as not correctly clearing the cache between test specs. To avoid this we can set the dev and test envs to useActiveSupport::Cache::MemoryStore
This issue has been mentioned previously in https://github.com/huacnlee/rails-settings-cached/issues/1 as well as on SO and on the Rails repo regarding inaccurate documentation here.