aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/controller/custom_handler_test.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/actionpack/test/controller/custom_handler_test.rb b/actionpack/test/controller/custom_handler_test.rb
index 8b9cdb0c26..2747a0f3ca 100644
--- a/actionpack/test/controller/custom_handler_test.rb
+++ b/actionpack/test/controller/custom_handler_test.rb
@@ -15,6 +15,7 @@ end
class CustomHandlerTest < Test::Unit::TestCase
def setup
ActionView::Base.register_template_handler "foo", CustomHandler
+ ActionView::Base.register_template_handler :foo2, CustomHandler
@view = ActionView::Base.new
end
@@ -25,6 +26,13 @@ class CustomHandlerTest < Test::Unit::TestCase
result )
end
+ def test_custom_render2
+ result = @view.render_template( "foo2", "hello <%= one %>", nil, :one => "two" )
+ assert_equal(
+ [ "hello <%= one %>", { :one => "two" }, @view ],
+ result )
+ end
+
def test_unhandled_extension
# uses the ERb handler by default if the extension isn't recognized
result = @view.render_template( "bar", "hello <%= one %>", nil, :one => "two" )