This project is archived and is in readonly mode.
test_help is unusable in an project that has more than one test environment
Reported by David Chelimsky | September 22nd, 2010 @ 09:11 PM
http://github.com/rails/rails/blob/aa85a7a7e70ece22728aa3463fc3427c...
abort("Abort testing: Your Rails environment is not running in test mode!") unless Rails.env.test?
This means tests won't run in any environment other than
test
, which makes multiple testing environments
impossible without patching abort
or
Rails.env
.
Comments and changes to this ticket
-
David Chelimsky September 22nd, 2010 @ 09:13 PM
Not sure what the best approach is here. We need the flexibility to have multiple test environments, but we also want to help prevent people from doing fun things like blowing away their production databases. How about changing the condition to
if Rails.env.production?
, and then adding a configurable (as in "I can turn it off") warning when not in thetest
environment? -
José Valim September 22nd, 2010 @ 10:34 PM
- Importance changed from to Low
Checking for Rails.env.development? or Rails.env.production? sounds good to me.
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>