aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2008-03-27 22:33:50 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2008-03-27 22:33:50 +0000
commitd8823d6fb7605788e6d61b3d5f67c0c7302527aa (patch)
tree41fe6f810c9605fd2c5990482e395720826665cf
parent8301ce4d0b9de4423b74abf842faa6cf9e5aae1b (diff)
downloadrails-d8823d6fb7605788e6d61b3d5f67c0c7302527aa.tar.gz
rails-d8823d6fb7605788e6d61b3d5f67c0c7302527aa.tar.bz2
rails-d8823d6fb7605788e6d61b3d5f67c0c7302527aa.zip
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
-rw-r--r--railties/CHANGELOG2
-rw-r--r--railties/lib/initializer.rb5
-rw-r--r--railties/lib/rails_generator/generators/applications/app/app_generator.rb2
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