Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

16 lines (15 sloc) 0.628 kb
require 'bundler'
Bundler::GemHelper.install_tasks
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[access_data.select { |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')
end
end
Jump to Line
Something went wrong with that request. Please try again.