Class: ActiveRecord::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/generators/templates/test_helper.rb

Overview

Make all database transactions use the same thread, otherwise signing up in capybara won’t get rolled back This must be run after the Rake::Tasks above

Constant Summary collapse

@@shared_connection =
nil

Class Method Summary collapse

Class Method Details

.connectionObject



78
79
80
# File 'lib/generators/templates/test_helper.rb', line 78

def self.connection
  @@shared_connection || retrieve_connection
end