Skip to content

Commit

Permalink
Removed database cleaner overrides because it fails when multiple ORM…
Browse files Browse the repository at this point in the history
…s are specified.
  • Loading branch information
danielmorrison committed Apr 7, 2011
1 parent d0b9c0b commit 2b19dca
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions lib/cucumber/rails/hooks/database_cleaner.rb
Expand Up @@ -3,22 +3,6 @@
begin
require 'database_cleaner'

Before do
begin
$__cucumber_global_database_cleaner_strategy ||= DatabaseCleaner.connections[0].strategy # There is no accessor on the DatabaseCleaner
rescue DatabaseCleaner::NoStrategySetError => e
e.message << "\nYou can set the strategy in your features/support/env.rb"
end
end

Before('~@no-txn', '~@selenium', '~@culerity', '~@celerity', '~@javascript') do
DatabaseCleaner.strategy = $__cucumber_global_database_cleaner_strategy
end

Before('@no-txn,@selenium,@culerity,@celerity,@javascript') do
DatabaseCleaner.strategy = :truncation
end

Before do
# TODO: May have to patch DatabaseCleaner's Transaction class to do what we used to do:
# run_callbacks :setup if respond_to?(:run_callbacks)
Expand Down

0 comments on commit 2b19dca

Please sign in to comment.