Why does development.log get message from testing?

Does anyone else find it a bit annoying that the development.log gets
the output from running tests that prepares the database? I was
hoping that this would be addressed in Rails 1.2, but it still happens.

I know the bulk of the logger output goes into test.log, but every so
often I see things like:

SQL (0.028947) DROP DATABASE IF EXISTS project_test
SQL (0.000711) CREATE DATABASE project_test
SQL (0.019973) SET foreign_key_checks = 0
SQL (0.002973) CREATE TABLE products (
id int(11) NOT NULL auto_increment,

in my development.log and have a second of panic that development
data is gone (“DROP DATABASE” sticks out like crazy!).

I have a feeling that the fix would be somewhere around rails-1.2.1/
lib/tasks/databases.rake line 37 for db:structure:dump, but I’d
really like to understand where RAILS_ENV is set when you just run
rake to perform tests.

All the messages get logged to test.log if you run env RAILS_ENV=test rake rather than just rake.

Is it just a matter of forcing RAILS_ENV=test earlier in the
initialization process somewhere?

-Rob

Rob B. http://agileconsultingllc.com
[email protected]