diff --git a/Rakefile b/Rakefile index 064a040..41a0e26 100644 --- a/Rakefile +++ b/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"] diff --git a/Readme.markdown b/Readme.markdown index 2cde4ea..a91eb92 100644 --- a/Readme.markdown +++ b/Readme.markdown @@ -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`.