Module: Minitest::Parallel::Db::ActiveRecord

Defined in:
lib/minitest/parallel/db/orms/active_record.rb

Defined Under Namespace

Modules: TestInstanceMethods

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(suite) ⇒ Object



7
8
9
10
# File 'lib/minitest/parallel/db/orms/active_record.rb', line 7

def self.included(suite)
  suite.send(:include, Parallel::Db)
  suite.send(:include, TestInstanceMethods)
end

Instance Method Details

#adapter_runObject



12
13
14
15
16
17
18
# File 'lib/minitest/parallel/db/orms/active_record.rb', line 12

def adapter_run
  model.transaction do
    yield
    raise ::ActiveRecord::Rollback
  end
  model.connection.close
end