mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-02-01 21:21:02 -05:00
Previously, `rake spec` ran the tests whether or not the `growstuff_test` database existed or not, but `rake` crashed unless it had already been created. The problem was that `rake` was trying to load the environment, which required the presence of a DB; `rake spec` was running this with the `dev` environment, so succeeded if `growstuff_dev` existed, but `rake` was running everything with the `test` environment, so would fail if `growstuff_test` did not exist. This patch adds `db:create` to the dependencies of the `spec` task, forcing an unadorned `rake` to create all necessary databases first.