From d8823d6fb7605788e6d61b3d5f67c0c7302527aa Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Thu, 27 Mar 2008 22:33:50 +0000 Subject: Stop adding the antiquated test/mocks/* directories and only add them to the path if theyre still there for legacy reasons [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9102 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- railties/lib/initializer.rb | 5 ++++- .../lib/rails_generator/generators/applications/app/app_generator.rb | 2 -- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'railties/lib') 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 -- cgit v1.2.3