lib/stationed/generators/templates/database_cleaner.rb in stationed-0.4.0 vs lib/stationed/generators/templates/database_cleaner.rb in stationed-0.5.0
- old
+ new
@@ -2,10 +2,10 @@
config.before(:suite) do
DatabaseCleaner.strategy = :transaction
DatabaseCleaner.clean_with(:truncation)
end
- config.before(:each) do
+ config.before(:each) do |example|
if example.metadata[:js]
DatabaseCleaner.strategy = :truncation
else
DatabaseCleaner.strategy = :transaction
DatabaseCleaner.start