Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
16 lines (15 sloc) 628 Bytes
require 'bundler'
namespace :features do
desc "create test database out of db/schema.rb"
task :create_database do
require 'rubygems'
require 'active_record'
access_data = YAML.load_file(File.dirname(__FILE__) + '/db/database.yml')['acts_as_account']
conn = ActiveRecord::Base.establish_connection(Hash[ { |k, v| k != 'database'}]).connection
conn.execute('DROP DATABASE IF EXISTS acts_as_account')
conn.execute('CREATE DATABASE acts_as_account')
conn.execute('USE acts_as_account')
load(File.dirname(__FILE__) + '/db/schema.rb')
Something went wrong with that request. Please try again.