From 64d67b23b493f1724f288dbd8efb3a218b6a7e19 Mon Sep 17 00:00:00 2001 From: Zachary Scott Date: Sat, 10 Aug 2013 23:44:44 -0400 Subject: [PATCH] This gets Mongo and DataMapper specs running but newer versions of AR, and incidentally Sinatra specs still fail. --- spec/support/database_cleaner.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/spec/support/database_cleaner.rb b/spec/support/database_cleaner.rb index 0c2297e..d95b6e2 100644 --- a/spec/support/database_cleaner.rb +++ b/spec/support/database_cleaner.rb @@ -5,7 +5,12 @@ DatabaseCleaner[:mongo_mapper].strategy = :truncation if defined? MongoMapper RSpec.configure do |config| config.before :suite do - DatabaseCleaner.clean_with :transaction + #DatabaseCleaner.clean_with :truncation + + DatabaseCleaner.clean_with :truncation if defined? ActiveRecord + DatabaseCleaner.clean_with :transaction if defined? DataMapper + DatabaseCleaner.clean_with :truncation if defined? Mongoid + DatabaseCleaner.clean_with :truncation if defined? MongoMapper end config.before :each do DatabaseCleaner.start