aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--railties/CHANGELOG5
-rw-r--r--railties/lib/initializer.rb3
2 files changed, 6 insertions, 2 deletions
diff --git a/railties/CHANGELOG b/railties/CHANGELOG
index 795f6de2ff..168d0c6b78 100644
--- a/railties/CHANGELOG
+++ b/railties/CHANGELOG
@@ -1,7 +1,8 @@
*SVN*
-* Nested controller scaffolding also nests the generated layout. [iain d broadf
-oot]
+* Add missing mock directories from the autoload_paths configuration. [Rick Olson]
+
+* Nested controller scaffolding also nests the generated layout. [iain d broadfoot]
* Add "require 'dispatcher'" to webrick server in the continuing quest to squash webrick weirdness. [Nicholas Seckar]
diff --git a/railties/lib/initializer.rb b/railties/lib/initializer.rb
index ef83c2c259..d7cb740dcb 100644
--- a/railties/lib/initializer.rb
+++ b/railties/lib/initializer.rb
@@ -564,6 +564,9 @@ module Rails
def default_autoload_paths
paths = []
+ mock_path = "#{root_path}/test/mocks/#{RAILS_ENV}"
+ paths << mock_path if File.directory?(mock_path)
+
# Add the app's controller directory
paths.concat(Dir["#{root_path}/app/controllers/"])