Skip to content

Commit

Permalink
[auth] Switch to using truncation only in js tests, but transaction i…
Browse files Browse the repository at this point in the history
…n others
  • Loading branch information
radar committed Nov 25, 2011
1 parent 1409594 commit 545f0a9
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions auth/spec/spec_helper.rb
Expand Up @@ -33,9 +33,12 @@
# examples within a transaction, comment the following line or assign false
# instead of true.
config.use_transactional_fixtures = false

config.before(:suite) do
DatabaseCleaner.strategy = :truncation, { :except => ['spree_countries', 'spree_zones', 'spree_zone_members', 'spree_states', 'spree_roles'] }
config.before(:each) do
if example.metadata[:js]
DatabaseCleaner.strategy = :truncation, { :except => ['spree_countries', 'spree_zones', 'spree_zone_members', 'spree_states', 'spree_roles'] }
else
DatabaseCleaner.strategy = :transaction
end
end

config.before(:each) do
Expand Down

0 comments on commit 545f0a9

Please sign in to comment.