lib/rspeckled/plugins/database_cleaner.rb in rspeckled-0.0.33 vs lib/rspeckled/plugins/database_cleaner.rb in rspeckled-0.0.34
- old
+ new
@@ -18,10 +18,10 @@
config.before(:suite) do
DatabaseCleaner.clean_with(:truncation, :except => %w{ar_internal_metadata})
end
config.around(:each) do |example|
- DatabaseCleaner.strategy = if example.metadata[:js]
+ DatabaseCleaner.strategy = if example.metadata[:js] || %i{mongoid}.include?(autodetected)
[:truncation, :except => %w{ar_internal_metadata}]
else
:transaction
end