aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2010-01-30 16:49:58 +0100
committerJosé Valim <jose.valim@gmail.com>2010-01-30 16:49:58 +0100
commitc164ca1efbb3b097d5a3f3db56c4988858607011 (patch)
tree767ac001e626b755071b83f398615945fff18588 /actionpack
parent2d567e470adb9241b400e02ccb0501efb7d09b14 (diff)
downloadrails-c164ca1efbb3b097d5a3f3db56c4988858607011.tar.gz
rails-c164ca1efbb3b097d5a3f3db56c4988858607011.tar.bz2
rails-c164ca1efbb3b097d5a3f3db56c4988858607011.zip
Bring helpers_dir deprecation back.
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_controller/metal/helpers.rb2
-rw-r--r--actionpack/test/controller/helper_test.rb21
2 files changed, 12 insertions, 11 deletions
diff --git a/actionpack/lib/action_controller/metal/helpers.rb b/actionpack/lib/action_controller/metal/helpers.rb
index ab2e0c020e..05843a061b 100644
--- a/actionpack/lib/action_controller/metal/helpers.rb
+++ b/actionpack/lib/action_controller/metal/helpers.rb
@@ -56,10 +56,12 @@ module ActionController
module ClassMethods
def helpers_dir
+ ActiveSupport::Deprecation.warn "helpers_dir is deprecated, use helpers_path instead"
self.helpers_path
end
def helpers_dir=(value)
+ ActiveSupport::Deprecation.warn "helpers_dir= is deprecated, use helpers_path= instead"
self.helpers_path = Array(value)
end
diff --git a/actionpack/test/controller/helper_test.rb b/actionpack/test/controller/helper_test.rb
index e53e62d1ff..75a96d6497 100644
--- a/actionpack/test/controller/helper_test.rb
+++ b/actionpack/test/controller/helper_test.rb
@@ -135,17 +135,16 @@ class HelperTest < ActiveSupport::TestCase
assert methods.include?('foobar')
end
- # TODO Add this deprecation back before Rails 3.0 final release
- # def test_deprecation
- # assert_deprecated do
- # ActionController::Base.helpers_dir = "some/foo/bar"
- # end
- # assert_deprecated do
- # assert_equal ["some/foo/bar"], ActionController::Base.helpers_dir
- # end
- # ensure
- # ActionController::Base.helpers_path = [File.dirname(__FILE__) + '/../fixtures/helpers']
- # end
+ def test_deprecation
+ assert_deprecated do
+ ActionController::Base.helpers_dir = "some/foo/bar"
+ end
+ assert_deprecated do
+ assert_equal ["some/foo/bar"], ActionController::Base.helpers_dir
+ end
+ ensure
+ ActionController::Base.helpers_path = [File.dirname(__FILE__) + '/../fixtures/helpers']
+ end
private
def expected_helper_methods