mirror of
https://github.com/drapergem/draper
synced 2023-03-27 23:21:17 -04:00
add db:migrate task
This commit is contained in:
parent
5e0f00df73
commit
a2e70b1f01
2 changed files with 8 additions and 3 deletions
7
Rakefile
7
Rakefile
|
@ -9,6 +9,13 @@ 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
|
||||
end
|
||||
|
||||
desc "Run all tests for CI"
|
||||
task "ci" => ["spec", "cucumber"]
|
||||
|
||||
|
|
|
@ -371,9 +371,7 @@ For automatic decoration, check out [decorates_before_rendering](https://github.
|
|||
If it's the first time you want to run the tests, start by creating the dummy database:
|
||||
|
||||
```
|
||||
$ pushd spec/dummy
|
||||
$ rake db:migrate db:test:prepare
|
||||
$ popd
|
||||
$ rake db:migrate
|
||||
```
|
||||
|
||||
You can then run tests by executing `rake`.
|
||||
|
|
Loading…
Add table
Reference in a new issue