diff options
Diffstat (limited to 'railties')
-rw-r--r-- | railties/CHANGELOG | 2 | ||||
-rw-r--r-- | railties/lib/initializer.rb | 5 | ||||
-rw-r--r-- | railties/lib/rails_generator/generators/applications/app/app_generator.rb | 2 |
3 files changed, 6 insertions, 3 deletions
diff --git a/railties/CHANGELOG b/railties/CHANGELOG index 818bbce1ac..7ca7d9528d 100644 --- a/railties/CHANGELOG +++ b/railties/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Stop adding the antiquated test/mocks/* directories and only add them to the path if they're still there for legacy reasons [DHH] + * Added that gems can now be plugins if they include rails/init.rb #11444 [jbarnette] * Added Plugin#about method to programmatically access the about.yml in a plugin #10979 [lazyatom] 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 |