diff --git a/examples/features/support/env.rb b/examples/features/support/env.rb index 2edcef9..1ba5553 100644 --- a/examples/features/support/env.rb +++ b/examples/features/support/env.rb @@ -42,9 +42,13 @@ if orm && strategy DatabaseCleaner.app_root = "#{File.dirname(__FILE__)}/../.." orm_sym = orm.gsub(/(.)([A-Z]+)/,'\1_\2').downcase.to_sym - if orm_sym == :mongo_mapper + case orm_sym + when :mongo_mapper DatabaseCleaner[ orm_sym, {:connection => 'database_cleaner_test_one'} ].strategy = strategy.to_sym DatabaseCleaner[ orm_sym, {:connection => 'database_cleaner_test_two'} ].strategy = strategy.to_sym + when :active_record + DatabaseCleaner[:active_record, {:connection => ActiveRecordWidgetUsingDatabaseOne} ].strategy = strategy.to_sym + DatabaseCleaner[:active_record, {:connection => ActiveRecordWidgetUsingDatabaseTwo} ].strategy = strategy.to_sym else DatabaseCleaner[ orm_sym, {:connection => :one} ].strategy = strategy.to_sym DatabaseCleaner[ orm_sym, {:connection => :two} ].strategy = strategy.to_sym diff --git a/features/cleaning_multiple_dbs.feature b/features/cleaning_multiple_dbs.feature index 23cc375..a426b5c 100644 --- a/features/cleaning_multiple_dbs.feature +++ b/features/cleaning_multiple_dbs.feature @@ -17,5 +17,4 @@ Feature: multiple database cleaning | DataMapper | truncation | | MongoMapper | truncation | | DataMapper | transaction | -# Not working... -#| ActiveRecord | transaction | + | ActiveRecord | transaction |