mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Canonicalize configuration.root_path and replace RAILS_ROOT.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6488 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
parent
0cac2806a6
commit
29d63a04ac
3 changed files with 7 additions and 16 deletions
|
@ -502,6 +502,8 @@ module Rails
|
|||
else
|
||||
Pathname.new(::RAILS_ROOT).realpath.to_s
|
||||
end
|
||||
|
||||
::RAILS_ROOT.replace @root_path
|
||||
end
|
||||
|
||||
# Loads and returns the contents of the #database_configuration_file. The
|
||||
|
|
|
@ -1 +1 @@
|
|||
$initialize_test_set_from_env = "success"
|
||||
$initialize_test_set_from_env = 'success'
|
||||
|
|
|
@ -1,25 +1,14 @@
|
|||
$:.unshift File.dirname(__FILE__) + "/../lib"
|
||||
$:.unshift File.dirname(__FILE__) + "/../../activesupport/lib"
|
||||
|
||||
require 'test/unit'
|
||||
require 'active_support'
|
||||
require "#{File.dirname(__FILE__)}/abstract_unit"
|
||||
require 'initializer'
|
||||
|
||||
class InitializerTest < Test::Unit::TestCase
|
||||
class ConfigurationMock < Rails::Configuration
|
||||
attr_reader :environment_path
|
||||
|
||||
def initialize(envpath)
|
||||
super()
|
||||
@envpath = envpath
|
||||
@environment_path = envpath
|
||||
end
|
||||
|
||||
def environment_path
|
||||
@envpath
|
||||
end
|
||||
|
||||
protected
|
||||
def root_path
|
||||
File.dirname(__FILE__)
|
||||
end
|
||||
end
|
||||
|
||||
def test_load_environment_with_constant
|
||||
|
|
Loading…
Reference in a new issue