add db:migrate task
This commit is contained in:
parent
5e0f00df73
commit
a2e70b1f01
7
Rakefile
7
Rakefile
|
@ -9,6 +9,13 @@ RSpec::Core::RakeTask.new
|
||||||
require 'cucumber/rake/task'
|
require 'cucumber/rake/task'
|
||||||
Cucumber::Rake::Task.new
|
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"
|
desc "Run all tests for CI"
|
||||||
task "ci" => ["spec", "cucumber"]
|
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:
|
If it's the first time you want to run the tests, start by creating the dummy database:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ pushd spec/dummy
|
$ rake db:migrate
|
||||||
$ rake db:migrate db:test:prepare
|
|
||||||
$ popd
|
|
||||||
```
|
```
|
||||||
|
|
||||||
You can then run tests by executing `rake`.
|
You can then run tests by executing `rake`.
|
||||||
|
|
Loading…
Reference in New Issue