Skip to content

Instantly share code, notes, and snippets.

View brendon's full-sized avatar

Brendon Muir brendon

View GitHub Profile
@metaskills
metaskills / transaction_fixtures.rb
Created October 20, 2015 19:46
Rails 4.2 Capybara Transactional Fixtures Example.
class ActiveRecord::Base
CONNECTION_LOCK = Mutex.new
def self.connection ; CONNECTION_LOCK.synchronize { @@shared_base_connection ||= retrieve_connection } ; end
end