add db:migrate task

This commit is contained in:
Vasiliy Ermolovich 2012-10-25 10:26:32 +03:00
parent 5e0f00df73
commit a2e70b1f01
2 changed files with 8 additions and 3 deletions

View File

@ -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"]

View File

@ -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`.