Notes on running postgres tests

[ci skip]
This commit is contained in:
Jared Beck 2015-12-19 20:53:36 -05:00
parent 72d6367541
commit 7280169f03
1 changed files with 22 additions and 0 deletions

View File

@ -59,4 +59,26 @@ cd ../..
DB=mysql bundle exec rake
```
Run tests with postgres:
```
# Create the appropriate database config. file
rm test/dummy/config/database.yml
DB=postgres bundle exec rake prepare
# If this is the first test run ever, create databases.
# Unlike mysql, use create/migrate instead of setup.
cd test/dummy
RAILS_ENV=test bundle exec rake db:create
RAILS_ENV=test bundle exec rake db:migrate
RAILS_ENV=foo bundle exec rake db:create
RAILS_ENV=foo bundle exec rake db:migrate
RAILS_ENV=bar bundle exec rake db:create
RAILS_ENV=bar bundle exec rake db:migrate
cd ../..
# Run tests
DB=postgres bundle exec rake
```
[1]: https://github.com/airblade/paper_trail/blob/master/doc/bug_report_template.rb