Sha256: 2a7ed52baa606796906deb0f0d82cc593dd3872bf8107aae0e2c187d6bbed1ba
Contents?: true
Size: 546 Bytes
Versions: 7
Compression:
Stored size: 546 Bytes
Contents
# Avoids using the database_cleaner gem and allow us to have faster # integration specs with selenium. See https://github.com/jnicklas/capybara at # transactional fixtures section. class ActiveRecord::Base mattr_accessor :shared_connection @@shared_connection = nil def self.connection @@shared_connection || retrieve_connection end end # Forces all threads to share the same connection. This works on # Capybara because it starts the web server in a thread. ActiveRecord::Base.shared_connection = ActiveRecord::Base.connection
Version data entries
7 entries across 7 versions & 1 rubygems