Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Force RAILS_ENV to be "test" in rake tasks (#776)
After #732, if you're using the SQL schema format, `parallel:prepare` now calls `db:purge db:structure:load` where it used to call `db:test:prepare`. The old task forced using the test environment, however the new tasks make no assumptions about the environment. Therefore, when combined with a Spring-ified rake binstub, where Spring defaults to the development environment, when `parallel:prepare` calls `db:purge db:structure:load`, they're running in the development environment against the development database, instead of in the test environment against the test database. Now the environment is forced to be "test" in all rake tasks regardless of the RAILS_ENV that might have been set, whether by Spring or the user. This has the side-effect of removing the ability to run the tasks in a test-like environment that's named something other than "test". I believe this fixes #768.
- Loading branch information