Created
October 2, 2013 20:09
-
-
Save Haar/6799766 to your computer and use it in GitHub Desktop.
WIP AR Spec Helper
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'active_record' | |
connection_info = YAML.load_file("config/database.yml")["test"] | |
ActiveRecord::Base.establish_connection(connection_info) unless ActiveRecord::Base.connected? | |
factory_girl_loaded = FactoryGirl.factories.find(:account) rescue false | |
require 'shoulda/matchers/integrations/rspec' | |
require 'factory_girl_rails' | |
FactoryGirl.find_definitions unless factory_girl_loaded | |
$:.push File.expand_path("../../app/models", __FILE__) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment