mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-11 03:40:20 +00:00
Make config reset for all tests more robust. Add cache isolation for parallel specs.
This commit is contained in:
@@ -11,6 +11,10 @@ Openfoodnetwork::Application.configure do
|
||||
config.serve_static_assets = true
|
||||
config.static_cache_control = "public, max-age=3600"
|
||||
|
||||
# Separate cache stores when running in parallel
|
||||
config.cache_store = :file_store, Rails.root.join("tmp", "cache", "paralleltests#{ENV['TEST_ENV_NUMBER']}")
|
||||
|
||||
|
||||
# Log error messages when you accidentally call methods on nil
|
||||
config.whiny_nils = true
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ RSpec.configure do |config|
|
||||
config.before(:each) { Spree::Address.any_instance.stub(:geocode).and_return([1,1]) }
|
||||
|
||||
# Ensure we start with consistent config settings
|
||||
config.before(:all) { Spree::Config.products_require_tax_category = false }
|
||||
config.before(:each) { Spree::Config.products_require_tax_category = false }
|
||||
|
||||
# Helpers
|
||||
config.include Rails.application.routes.url_helpers
|
||||
|
||||
Reference in New Issue
Block a user