From 5bf0863cc56c8aa898e3ccd0175d544c567532d4 Mon Sep 17 00:00:00 2001 From: snusnu Date: Thu, 7 May 2009 04:40:40 +0200 Subject: [PATCH] use DataMapper.repository instead of repository. --- lib/database_cleaner/data_mapper/transaction.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/database_cleaner/data_mapper/transaction.rb b/lib/database_cleaner/data_mapper/transaction.rb index 12ee84c..f2e06be 100644 --- a/lib/database_cleaner/data_mapper/transaction.rb +++ b/lib/database_cleaner/data_mapper/transaction.rb @@ -2,7 +2,7 @@ module DatabaseCleaner::DataMapper class Transaction def start(repo = :default) - repository(repo) do |r| + DataMapper.repository(repo) do |r| transaction = DataMapper::Transaction.new(r) transaction.begin r.adapter.push_transaction(transaction) @@ -10,7 +10,7 @@ module DatabaseCleaner::DataMapper end def clean(repo = :default) - repository(repo) do |r| + DataMapper.repository(repo) do |r| adapter = r.adapter while adapter.current_transaction adapter.current_transaction.rollback