This project is archived and is in readonly mode.

#2857 ✓hold
Michael Schuerig

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

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=""></a>

People watching this ticket