Permalink
Browse files

Merge pull request #1504 from arunagw/console_test_for_ci_server

Fix for CI server. Dependent on RAILS_ENV=development
  • Loading branch information...
2 parents 38b97d2 + 5d78d81 commit 2d3ba54b86a7307d01fbe364ed831de428cabeba @josevalim josevalim committed Jun 6, 2011
Showing with 6 additions and 0 deletions.
  1. +6 −0 railties/test/application/console_test.rb
@@ -4,10 +4,16 @@ class ConsoleTest < Test::Unit::TestCase
include ActiveSupport::Testing::Isolation
def setup
+ @prev_rails_env = ENV['RAILS_ENV']
+ ENV['RAILS_ENV'] = 'development'
build_app
boot_rails
end
+ def teardown
+ ENV['RAILS_ENV'] = @prev_rails_env
+ end
+
def load_environment(sandbox = false)
require "#{rails_root}/config/environment"
Rails.application.sandbox = sandbox

0 comments on commit 2d3ba54

Please sign in to comment.