From 5c48a89a7f6f42391522a9ddaacee52a1843db5f Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Wed, 9 Nov 2005 15:11:55 +0000 Subject: Force RAILS_ENV to be "test" when running tests, so that ENV["RAILS_ENV"] = "production" in config/environment.rb doesnt wreck havok [DHH] (closes #2660) git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2955 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- railties/lib/test_help.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'railties/lib') diff --git a/railties/lib/test_help.rb b/railties/lib/test_help.rb index 3f3cab8a95..9238d1e244 100644 --- a/railties/lib/test_help.rb +++ b/railties/lib/test_help.rb @@ -1,5 +1,9 @@ require 'application' +# Make double-sure the RAILS_ENV is set to test, +# so fixtures are loaded to the right database +silence_warnings { RAILS_ENV = "test" } + require 'test/unit' require 'active_record/fixtures' require 'action_controller/test_process' -- cgit v1.2.3