Commits
schneems authored c2daaa6a75a
Fix errors when rake tasks missing
There are two modes of errors that were causing failures.
1) `db:test:purge` or other task does not exist it, yet we try to clear it.
Solution: check the task exists before trying to clear
```
if Rake::Task.task_defined?('db:test:purge')
```
2) Rails apps aren't required to have a database or activerecord.
When this happens the `db:schema:load_if_ruby` and `db:structure:load_if_sql` will fail which will cause the testpack to look up schema format and fail when it's not set.
Solution: Exit early if no `db:migrate` task is present.
```
return [] if db_migrate.not_defined?
```