Skip to content

Commit

Permalink
Merge pull request cucumber#124 from jurisgalang/master
Browse files Browse the repository at this point in the history
DatabaseCleaner::Base#strategy no longer raises an exception.
  • Loading branch information
aslakhellesoy committed May 9, 2011
2 parents 42dc89f + 1e9d572 commit 0bd3a70
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/cucumber/rails/hooks/database_cleaner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@
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
$__cucumber_global_database_cleaner_strategy ||= DatabaseCleaner.connections[0].strategy
end

Before('~@no-txn', '~@selenium', '~@culerity', '~@celerity', '~@javascript') do
Expand Down

0 comments on commit 0bd3a70

Please sign in to comment.