Use an appropriate rebuild task on Travis

Use `db:mysql:rebuild` when testing mysql2,
`db:postgresql:rebuild` when testing postgresql
and no rebuild task when testing others.
This commit is contained in:
yui-knk 2015-12-19 13:45:40 +09:00
parent 1611ab4db1
commit bf8ca88b91
1 changed files with 8 additions and 1 deletions

View File

@ -60,7 +60,14 @@ class Build
def tasks
if activerecord?
['db:mysql:rebuild', "#{adapter}:#{'isolated_' if isolated?}test"]
tasks = ["#{adapter}:#{'isolated_' if isolated?}test"]
case adapter
when 'mysql2'
tasks.unshift 'db:mysql:rebuild'
when 'postgresql'
tasks.unshift 'db:postgresql:rebuild'
end
tasks
else
["test", ('isolated' if isolated?), ('integration' if integration?)].compact.join(":")
end