From 09f5bb8eed9372940048a7407d5c2cecbe3148ba Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Tue, 26 Jun 2012 16:05:21 +1000 Subject: [PATCH] Switch database cleaner strategy back to transaction after js test has run --- spec/spec_helper.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index fcf0baebd9..872b50039f 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -52,12 +52,16 @@ Spork.prefork do DatabaseCleaner.strategy = :transaction end + config.before(:each) do + DatabaseCleaner.start + end + config.before(type: :request, js: true) do DatabaseCleaner.strategy = :truncation, { :except => ['spree_countries', 'spree_states'] } end - config.before(:each) do - DatabaseCleaner.start + config.before(js: false) do + DatabaseCleaner.strategy = :transaction end config.after(:each) do