Sha256: 4ffc4846700cfc2130c1e7f5cd399f08effe06d3e0ee44519124d680e2ec956d
Contents?: true
Size: 385 Bytes
Versions: 30
Compression:
Stored size: 385 Bytes
Contents
# In your test_helper.rb 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
30 entries across 30 versions & 1 rubygems