From 2110a524a4913815d036786aa01319fd67db0ee2 Mon Sep 17 00:00:00 2001 From: Carl Lerche Date: Fri, 16 Oct 2009 12:49:39 -0700 Subject: Deprecate RAILS_ROOT in favor of Rails.root (which proxies to the application's object root) --- railties/test/application/configuration_test.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'railties/test/application/configuration_test.rb') diff --git a/railties/test/application/configuration_test.rb b/railties/test/application/configuration_test.rb index d90582d3db..0452208cae 100644 --- a/railties/test/application/configuration_test.rb +++ b/railties/test/application/configuration_test.rb @@ -12,7 +12,7 @@ module ApplicationTests test "the application root is set correctly" do require "#{app_path}/config/environment" - assert_equal app_path, Rails.application.root + assert_equal Pathname.new(app_path), Rails.application.root end test "the application root can be set" do @@ -22,7 +22,7 @@ module ApplicationTests config.root = '#{app_path}/hello' RUBY require "#{app_path}/config/environment" - assert_equal "#{app_path}/hello", Rails.application.root + assert_equal Pathname.new("#{app_path}/hello"), Rails.application.root end test "the application root is detected as where config.ru is located" do @@ -31,7 +31,7 @@ module ApplicationTests RUBY FileUtils.mv "#{app_path}/config.ru", "#{app_path}/config/config.ru" require "#{app_path}/config/environment" - assert_equal "#{app_path}/config", Rails.application.root + assert_equal Pathname.new("#{app_path}/config"), Rails.application.root end test "the application root is Dir.pwd if there is no config.ru" do @@ -42,7 +42,7 @@ module ApplicationTests Dir.chdir("#{app_path}/app") do require "#{app_path}/config/environment" - assert_equal "#{app_path}/app", Rails.application.root + assert_equal Pathname.new("#{app_path}/app"), Rails.application.root end end end -- cgit v1.2.3