We have a continuous integration server setup for our rails projects.
I would like to set-up a different rails environment for running the
tests on the build server so that I don't have to force all the
developers to set-up their local databases to match the build box's
connection information. However, when do something like:
rake RAILS_ENV=build test:units
It still tries to use the db connection information from the test
environment. I think this must be hardcoded somewhere.
Is there a way to get the test tasks to run with a different rails
environment?
It would be better to not share the database.yml at all. That way,
you can define what the "test" environment means for the ci server
independently of the developers.
I think it's better practice to not store the database.yml in source
control anyway, since it has passwords that you may not want to store
in source control.