aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2010-12-09 13:15:40 +0100
committerJosé Valim <jose.valim@gmail.com>2010-12-09 13:15:40 +0100
commitcc70ac9508dff6a4406f446d7a53d05f6c7d9f61 (patch)
tree2437815d08262cfc07b2514ec96a30eee63e7428 /actionpack/test/template
parent28cf77203b0b5af648e441b5d9cfb75863ba2f39 (diff)
downloadrails-cc70ac9508dff6a4406f446d7a53d05f6c7d9f61.tar.gz
rails-cc70ac9508dff6a4406f446d7a53d05f6c7d9f61.tar.bz2
rails-cc70ac9508dff6a4406f446d7a53d05f6c7d9f61.zip
Properly check the arity for template handlers.
Diffstat (limited to 'actionpack/test/template')
-rw-r--r--actionpack/test/template/render_test.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/actionpack/test/template/render_test.rb b/actionpack/test/template/render_test.rb
index 8087429d62..38bedd2e4e 100644
--- a/actionpack/test/template/render_test.rb
+++ b/actionpack/test/template/render_test.rb
@@ -225,6 +225,11 @@ module RenderTestCases
%'"#{template.class} #{view.class}"'
end
+ def test_render_inline_with_render_from_to_proc
+ ActionView::Template.register_template_handler :ruby_handler, :source.to_proc
+ assert_equal '3', @view.render(:inline => "(1 + 2).to_s", :type => :ruby_handler)
+ end
+
def test_render_inline_with_template_handler_with_view
ActionView::Template.register_template_handler :with_view, WithViewHandler
assert_equal 'ActionView::Template ActionView::Base', @view.render(:inline => "Hello, World!", :type => :with_view)