diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index a82d425e6..15c49772e 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -193,6 +193,11 @@ RSpec.configure do |config| savon.unmock! end + config.before(:each, :with_cache) do + allow(Rails).to receive(:cache).and_return(ActiveSupport::Cache.lookup_store(:memory_store)) + Rails.cache.clear + end + # Allows RSpec to persist some state between runs in order to support # the `--only-failures` and `--next-failure` CLI options. config.example_status_persistence_file_path = "spec/examples.txt"