diff options
author | José Valim <jose.valim@gmail.com> | 2012-02-20 11:48:14 -0800 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2012-02-20 20:49:39 +0100 |
commit | 5e3b54d25aeb84c4d6806416fbd6c21c29564d6a (patch) | |
tree | fd1a9a5065d6722061f62875d51d144feeaf6fa1 /actionpack/test | |
parent | 07dc909a47b644a9fe841ceaa6234fd8abac94c6 (diff) | |
download | rails-5e3b54d25aeb84c4d6806416fbd6c21c29564d6a.tar.gz rails-5e3b54d25aeb84c4d6806416fbd6c21c29564d6a.tar.bz2 rails-5e3b54d25aeb84c4d6806416fbd6c21c29564d6a.zip |
Merge pull request #5101 from ckdake/ckdake_actionview_handler_reset
Reset memoized hash keys when new ActionView::Template handler is registered
Conflicts:
actionpack/lib/action_view/template/handlers.rb
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/template/render_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/actionpack/test/template/render_test.rb b/actionpack/test/template/render_test.rb index 5d3dc73ed2..788ad61356 100644 --- a/actionpack/test/template/render_test.rb +++ b/actionpack/test/template/render_test.rb @@ -299,6 +299,12 @@ module RenderTestCases ActionView::Template.register_template_handler :foo, CustomHandler assert_equal 'source: "Hello, <%= name %>!"', @view.render(:inline => "Hello, <%= name %>!", :locals => { :name => "Josh" }, :type => :foo) end + + def test_render_knows_about_types_registered_when_extensions_are_checked_earlier_in_initialization + ActionView::Template::Handlers.extensions + ActionView::Template.register_template_handler :foo, CustomHandler + assert ActionView::Template::Handlers.extensions.include?(:foo) + end def test_render_ignores_templates_with_malformed_template_handlers ActiveSupport::Deprecation.silence do |