title: Why not use shared ActiveRecord connections for Rspec + Selenium?
body: <p>It seems the most commonly accepted way to deal with Selenium and tests is to avoid using transactional fixtures and then using something like database_cleaner between tests/scenarios. I recently ran into the following <a href="http://blog.plataformatec.com.br/2011/12/three-tips-to-improve-the-performance-of-your-test-suite/" rel="noreferrer">article</a> which suggested doing the following:</p>
  
  <p><strong>spec_helper.rb</strong></p>
  
  <pre><code>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
  </code></pre>
  
  <p>This seems loads better for performance than the alternatives. Does anyone have any reason why this shouldn't be used?</p>