diff --git a/config/environments/test.rb b/config/environments/test.rb index dd3413c8f0..46d5dcf7c6 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -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 diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index c8e1a2e682..f77ca40521 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -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