This project is archived and is in readonly mode.
Setting schema_format in config/environments/test.rb does not work
Reported by Michael Schuerig | June 30th, 2009 @ 04:23 PM | in 3.0.2
The application skeleton generated by rails suggests that the schema format can and should be set in config/environments/test.rb. This doesn't work, unfortunately. Currently, config.active_record.schema_format has to be set in config/environment.rb (or presumably config/environments/development.rb) in order to have an effect.
As far as I can tell, rake test runs in the development environment and that is what the tasks in database.rake apparently assume anyway. Only very late in the process when railties/lib/test_help.rb is loaded from test_helper.rb, the environment is switched to test.
As the schema format is an application-wide setting anyway, I suggest to move the relevant boilerplate from the test.rb template to the environment.rb template.
Comments and changes to this ticket
-
Yehuda Katz (wycats) July 1st, 2009 @ 07:28 PM
- Tag changed from railties, schema_format to initializer, railties, schema_format
- Milestone cleared.
- Assigned user set to Yehuda Katz (wycats)
We're in the process of cleaning up the initializer so we'll take a look at this in the next few days.
-
Yehuda Katz (wycats) July 1st, 2009 @ 11:40 PM
- State changed from new to hold
-
Jeremy Kemper October 15th, 2010 @ 11:01 PM
- Milestone set to 3.0.2
- Importance changed from to
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>