aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--railties/lib/rails/engine/configuration.rb6
-rw-r--r--railties/test/application/initializers/load_path_test.rb4
2 files changed, 8 insertions, 2 deletions
diff --git a/railties/lib/rails/engine/configuration.rb b/railties/lib/rails/engine/configuration.rb
index 446fe0bda9..620a723a04 100644
--- a/railties/lib/rails/engine/configuration.rb
+++ b/railties/lib/rails/engine/configuration.rb
@@ -20,15 +20,19 @@ module Rails
paths.app.models "app/models", :eager_load => true
paths.app.mailers "app/mailers", :eager_load => true
paths.app.views "app/views"
- paths.lib "lib", :load_path => true
+
+ paths.lib "lib"
paths.lib.tasks "lib/tasks", :glob => "**/*.rake"
+
paths.config "config"
paths.config.initializers "config/initializers", :glob => "**/*.rb"
paths.config.locales "config/locales", :glob => "*.{rb,yml}"
paths.config.routes "config/routes.rb"
+
paths.public "public"
paths.public.javascripts "public/javascripts"
paths.public.stylesheets "public/stylesheets"
+
paths
end
end
diff --git a/railties/test/application/initializers/load_path_test.rb b/railties/test/application/initializers/load_path_test.rb
index 714d62311d..d9aac8719c 100644
--- a/railties/test/application/initializers/load_path_test.rb
+++ b/railties/test/application/initializers/load_path_test.rb
@@ -19,7 +19,7 @@ module ApplicationTests
assert $:.include?("#{app_path}/app/models")
end
- test "initializing an application allows to load code on lib path inside application class definitation" do
+ test "initializing an application allows to load code on lib path inside application class definition" do
app_file "lib/foo.rb", <<-RUBY
module Foo; end
RUBY
@@ -60,6 +60,8 @@ module ApplicationTests
add_to_config <<-RUBY
config.root = "#{app_path}"
+ config.cache_classes = true
+ config.load_paths << "#{app_path}/lib"
config.eager_load_paths << "#{app_path}/lib"
RUBY