DatabaseCleaner() method was cool, but really isn't needed...

This commit is contained in:
Ben Mabey 2009-03-04 22:17:32 -07:00
parent 3fc800e17a
commit 066ba919ad
2 changed files with 2 additions and 5 deletions

View file

@ -1,6 +1,3 @@
$LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__))) unless $LOAD_PATH.include?(File.expand_path(File.dirname(__FILE__)))
require 'database_cleaner/configuration'
def DatabaseCleaner(*args)
DatabaseCleaner.create_strategy(*args)
end

View file

@ -21,10 +21,10 @@ describe DatabaseCleaner do
DatabaseCleaner.orm = nil
end
describe ".create_strategy ( DatabaseCleaner() )" do
describe ".create_strategy" do
it "should initialize and return the appropirate strategy" do
DatabaseCleaner::ActiveRecord::Transaction.should_receive(:new).with('options' => 'hash')
result = DatabaseCleaner(:transaction, {'options' => 'hash'})
result = DatabaseCleaner.create_strategy(:transaction, {'options' => 'hash'})
result.should == @strategy
end