Sha256: 6c3d126c92d8aafb626f1b6961f93b9e59fbc8815882e4a32fa5c034a9a5c9a2
Contents?: true
Size: 495 Bytes
Versions: 1
Compression:
Stored size: 495 Bytes
Contents
require 'bundler/gem_tasks' require 'rspec/core/rake_task' require 'pg' def create_db(conn, name) conn.exec "CREATE DATABASE #{name}" rescue PG::DuplicateDatabase puts "Create database skipped: '#{name}' already exists." end RSpec::Core::RakeTask.new(:spec) task :default => :spec namespace :db do task :create do conn = PG::Connection.open(ENV['TEST_DB_HOST']) create_db conn, 'pg_conduit_src_test' create_db conn, 'pg_conduit_dest_test' ensure conn.close end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
pg_conduit-0.1.0 | Rakefile |