Skip to content
Browse files

Fix for CI server. Dependent on RAILS_ENV=development

  • Loading branch information...
1 parent db9ad5e commit 101f0a6c6a9690f2128c48a7627f303662e3d66b @arunagw arunagw committed
Showing with 7 additions and 1 deletion.
  1. +7 −1 railties/test/application/console_test.rb
View
8 railties/test/application/console_test.rb
@@ -4,11 +4,17 @@ 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 load_environment
+ def teardown
+ ENV['RAILS_ENV'] = @prev_rails_env
+ end
+
+ def load_environment(sandbox = false)
require "#{rails_root}/config/environment"
Rails.application.load_console
end

0 comments on commit 101f0a6

Please sign in to comment.
Something went wrong with that request. Please try again.