Skip to content

Instantly share code, notes, and snippets.

View nagi's full-sized avatar

Andrew Nagi nagi

  • Magical Bytes Ltd
  • London, UK
View GitHub Profile
# See http://m.onkey.org/running-rails-performance-tests-on-real-data
# fixed to work with Rails 3.2.15
# START : HAX HAX HAX
# Load Rails environment in 'test' mode
ENV["RAILS_ENV"] ||= "test"
require File.expand_path('../../config/environment', __FILE__)
# Re-establish db connection for 'performance' mode
ActiveRecord::Base.establish_connection(:performance)