diff options
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/initializer.rb | 5 | ||||
-rw-r--r-- | railties/lib/rails_generator/generators/applications/app/app_generator.rb | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/railties/lib/initializer.rb b/railties/lib/initializer.rb index c3ebffdf03..4a536e0483 100644 --- a/railties/lib/initializer.rb +++ b/railties/lib/initializer.rb @@ -615,7 +615,10 @@ module Rails end def default_load_paths - paths = ["#{root_path}/test/mocks/#{environment}"] + paths = [] + + # Add the old mock paths only if the directories exists + paths.concat(Dir["#{root_path}/test/mocks/#{environment}"]) if File.exists?("#{root_path}/test/mocks/#{environment}") # Add the app's controller directory paths.concat(Dir["#{root_path}/app/controllers/"]) diff --git a/railties/lib/rails_generator/generators/applications/app/app_generator.rb b/railties/lib/rails_generator/generators/applications/app/app_generator.rb index 473ead2a7c..28f8ce2149 100644 --- a/railties/lib/rails_generator/generators/applications/app/app_generator.rb +++ b/railties/lib/rails_generator/generators/applications/app/app_generator.rb @@ -155,8 +155,6 @@ class AppGenerator < Rails::Generator::Base test/fixtures test/functional test/integration - test/mocks/development - test/mocks/test test/unit vendor vendor/plugins |