Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add missing mock directories from the autoload_paths configuration. […

…Rick Olson]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4736 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit af7a6e57cd718a6ca2182bfb7ee441ad3c1158fb 1 parent e448b34
risk danger olson technoweenie authored
Showing with 6 additions and 2 deletions.
  1. +3 −2 railties/CHANGELOG
  2. +3 −0  railties/lib/initializer.rb
5 railties/CHANGELOG
View
@@ -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]
3  railties/lib/initializer.rb
View
@@ -564,6 +564,9 @@ def default_load_paths
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/"])
Please sign in to comment.
Something went wrong with that request. Please try again.