aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/test_case.rb
diff options
context:
space:
mode:
authorCarl Lerche <carllerche@mac.com>2010-09-13 12:51:42 -0700
committerCarl Lerche <carllerche@mac.com>2010-09-13 12:51:42 -0700
commit84d0c30cea243f020aa7437a2f0313a9b3f13ec4 (patch)
tree07e07f5d8131f44d29dbbbc68e5a705bfad1a5b4 /actionpack/lib/action_view/test_case.rb
parent4eb89873c9ba4032c07447e5b454fcf8f548e671 (diff)
downloadrails-84d0c30cea243f020aa7437a2f0313a9b3f13ec4.tar.gz
rails-84d0c30cea243f020aa7437a2f0313a9b3f13ec4.tar.bz2
rails-84d0c30cea243f020aa7437a2f0313a9b3f13ec4.zip
Allow view helper's #initialize method to be called. [#5061 state:resolved]
Diffstat (limited to 'actionpack/lib/action_view/test_case.rb')
-rw-r--r--actionpack/lib/action_view/test_case.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/test_case.rb b/actionpack/lib/action_view/test_case.rb
index e9d2e0b843..2c2661df26 100644
--- a/actionpack/lib/action_view/test_case.rb
+++ b/actionpack/lib/action_view/test_case.rb
@@ -74,6 +74,11 @@ module ActionView
@helper_class ||= determine_default_helper_class(name)
end
+ def new(*)
+ include_helper_modules!
+ super
+ end
+
private
def include_helper_modules!
@@ -89,7 +94,6 @@ module ActionView
@output_buffer = ActiveSupport::SafeBuffer.new
@rendered = ''
- self.class.send(:include_helper_modules!)
make_test_case_available_to_view!
say_no_to_protect_against_forgery!
end