Sha256: 588394b25a2f7b02951de42e3e508ff0c3d203cd4b6989367c3ea562958df151
Contents?: true
Size: 482 Bytes
Versions: 2
Compression:
Stored size: 482 Bytes
Contents
require 'database_cleaner/sequel/base' module DatabaseCleaner module Sequel class Transaction include ::DatabaseCleaner::Sequel::Base def start @transactions ||= [] db.send(:add_transaction) @transactions << db.send(:begin_transaction, db) end def clean transaction = @transactions.pop db.send(:rollback_transaction, transaction) db.send(:remove_transaction, transaction) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
database_cleaner-0.7.1 | lib/database_cleaner/sequel/transaction.rb |
database_cleaner-0.7.0 | lib/database_cleaner/sequel/transaction.rb |