Permalink
Browse files

AppName::Application.root should work

  • Loading branch information...
Yehuda Katz Yehuda Katz
Yehuda Katz authored and Yehuda Katz committed Jan 3, 2010
1 parent f1cd3a9 commit 106d8f76888e76096f83e884f55dbcd536a0c1d7
Showing with 6 additions and 1 deletion.
  1. +1 −1 railties/lib/rails/application.rb
  2. +5 −0 railties/test/application/configuration_test.rb
@@ -8,7 +8,7 @@ class Application
class << self
attr_writer :config
alias configure class_eval
- delegate :initialize!, :load_tasks, :to => :instance
+ delegate :initialize!, :load_tasks, :root, :to => :instance
private :new
def instance
@@ -24,6 +24,11 @@ def setup
assert_equal Pathname.new(app_path), Rails.application.root
end
+ test "the application root can be seen from the application singleton" do
+ require "#{app_path}/config/environment"
+ assert_equal Pathname.new(app_path), AppTemplate::Application.root
+ end
+
test "the application root can be set" do
copy_app
add_to_config <<-RUBY

0 comments on commit 106d8f7

Please sign in to comment.