Permalink
Browse files

use DataMapper.repository instead of repository.

  • Loading branch information...
snusnu committed May 7, 2009
1 parent 03fcbd6 commit 5bf0863cc56c8aa898e3ccd0175d544c567532d4
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/database_cleaner/data_mapper/transaction.rb
@@ -2,15 +2,15 @@ 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)
end
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

0 comments on commit 5bf0863

Please sign in to comment.