Skip to content
Browse files

use DataMapper.repository instead of repository.

  • Loading branch information...
1 parent 03fcbd6 commit 5bf0863cc56c8aa898e3ccd0175d544c567532d4 @snusnu snusnu committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/database_cleaner/data_mapper/transaction.rb
View
4 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 @@ def start(repo = :default)
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.
Something went wrong with that request. Please try again.