require ‘active_record' config = YAML.load(ERB.new( IO.read(‘config/database.yml') ).result) @connection = ActiveRecord::Base .establish_connection(config[‘test']) ActiveRecord::Base .raise_in_transactional_callbacks = true true end end RSpec.configuration.before :context, :db do Support::Database.setup! end