travis-api/Rakefile
2016-02-11 10:26:24 +01:00

15 lines
391 B
Ruby

require 'rake'
require 'travis/migrations'
task default: :spec
namespace :db do
desc 'Create the test database'
task :create do
sh 'createdb travis_test' rescue nil
sh 'mkdir spec/support/db'
sh "cp #{Gem.loaded_specs['travis-migrations'].full_gem_path}/db/structure.sql spec/support/db/structure.sql"
sh 'psql -q travis_test < spec/support/db/structure.sql'
end
end