mirror of
https://github.com/DatabaseCleaner/database_cleaner
synced 2023-03-27 23:22:03 -04:00
DatabaseCleaner() method was cool, but really isn't needed...
This commit is contained in:
parent
3fc800e17a
commit
066ba919ad
2 changed files with 2 additions and 5 deletions
|
@ -1,6 +1,3 @@
|
||||||
$LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__))) unless $LOAD_PATH.include?(File.expand_path(File.dirname(__FILE__)))
|
$LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__))) unless $LOAD_PATH.include?(File.expand_path(File.dirname(__FILE__)))
|
||||||
require 'database_cleaner/configuration'
|
require 'database_cleaner/configuration'
|
||||||
|
|
||||||
def DatabaseCleaner(*args)
|
|
||||||
DatabaseCleaner.create_strategy(*args)
|
|
||||||
end
|
|
||||||
|
|
|
@ -21,10 +21,10 @@ describe DatabaseCleaner do
|
||||||
DatabaseCleaner.orm = nil
|
DatabaseCleaner.orm = nil
|
||||||
end
|
end
|
||||||
|
|
||||||
describe ".create_strategy ( DatabaseCleaner() )" do
|
describe ".create_strategy" do
|
||||||
it "should initialize and return the appropirate strategy" do
|
it "should initialize and return the appropirate strategy" do
|
||||||
DatabaseCleaner::ActiveRecord::Transaction.should_receive(:new).with('options' => 'hash')
|
DatabaseCleaner::ActiveRecord::Transaction.should_receive(:new).with('options' => 'hash')
|
||||||
result = DatabaseCleaner(:transaction, {'options' => 'hash'})
|
result = DatabaseCleaner.create_strategy(:transaction, {'options' => 'hash'})
|
||||||
|
|
||||||
result.should == @strategy
|
result.should == @strategy
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue