require "rubygems" require "rspec" require "active_support" require "active_record" require "yaml" # Establish DB Connection config = YAML::load(IO.read(File.join(File.dirname(__FILE__), 'db', 'database.yml'))) ActiveRecord::Base.configurations = {'test' => config[ENV['DB'] || 'sqlite3']} ActiveRecord::Base.establish_connection(ActiveRecord::Base.configurations['test']) # Load Test Schema into the Database load(File.dirname(__FILE__) + "/db/schema.rb") require File.dirname(__FILE__) + '/../init'