mirror of
https://github.com/drapergem/draper
synced 2023-03-27 23:21:17 -04:00
Make database a file task.
Now it will only do the migration if we need to.
This commit is contained in:
parent
d343639240
commit
6f3579a63e
1 changed files with 4 additions and 6 deletions
10
Rakefile
10
Rakefile
|
@ -9,14 +9,12 @@ RSpec::Core::RakeTask.new
|
|||
require 'cucumber/rake/task'
|
||||
Cucumber::Rake::Task.new
|
||||
|
||||
namespace :db do
|
||||
desc 'Prepare sqlite database'
|
||||
task :migrate do
|
||||
system 'cd spec/dummy && rake db:migrate RAILS_ENV=test && rake db:migrate RAILS_ENV=development'
|
||||
end
|
||||
file "spec/dummy/db/test.sqlite3" do
|
||||
system "cd spec/dummy &&
|
||||
RAILS_ENV=test rake db:migrate"
|
||||
end
|
||||
|
||||
task :cucumber => :"db:migrate"
|
||||
task :cucumber => :"spec/dummy/db/test.sqlite3"
|
||||
|
||||
desc "Run all tests for CI"
|
||||
task "ci" => ["spec", "cucumber"]
|
||||
|
|
Loading…
Reference in a new issue