Allow running specs scenarios using the Rails cache
Cache is by default disabled on every non-production environment
This commit is contained in:
committed by
Javi Martín
parent
62cd4c8d7b
commit
f30fa29994
@@ -193,6 +193,11 @@ RSpec.configure do |config|
|
|||||||
savon.unmock!
|
savon.unmock!
|
||||||
end
|
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
|
# Allows RSpec to persist some state between runs in order to support
|
||||||
# the `--only-failures` and `--next-failure` CLI options.
|
# the `--only-failures` and `--next-failure` CLI options.
|
||||||
config.example_status_persistence_file_path = "spec/examples.txt"
|
config.example_status_persistence_file_path = "spec/examples.txt"
|
||||||
|
|||||||
Reference in New Issue
Block a user