Make config reset for all tests more robust. Add cache isolation for parallel specs.

This commit is contained in:
Rohan Mitchell
2015-06-24 14:02:45 +10:00
parent 7a36e92592
commit bc11140a40
2 changed files with 5 additions and 1 deletions

View File

@@ -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

View File

@@ -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