views:

110

answers:

0

Hello,

I am trying to add and additional test environment to a rails 2.3.4 project. I have added the proper db configuration into database.yml and I have created a file with the name of the environment in the environments directory which is a basically copy of test.rb. The new environment is named test_ci.

When I run all tests using the command...

rake RAILS_ENV=test_ci test

the functional and integration tests run successfully in the test_ci environment but the unit tests do not run. I receive a Errors running test:units! message.

When I execute the command...

rake RAILS_ENV=test_ci test:units

The unit tests run but in the incorrect environment. They are running in the default test environment not the test_ci environment as specified. Running rake RAILS_ENV=test_ci test:functionals or rake RAILS_ENV=test_ci test:integration also run in the default test environment.

Does anyone have any insight into this? Is there a better way to configure multiple test environments? Any help would be appreciated.

Thanks,

Tom