diff options
| author | Neeraj Singh <neerajdotname@gmail.com> | 2010-11-22 17:32:27 -0500 |
|---|---|---|
| committer | Neeraj Singh <neerajdotname@gmail.com> | 2010-11-22 17:32:27 -0500 |
| commit | 5debc65c356c619bce20dcc10c0befc7c4204ef5 (patch) | |
| tree | dc32bab1eccd11bacdaff70f25696689a2b9dc66 /actionpack/test/template/render_test.rb | |
| parent | 1c68e55ae5e90b7c072a1f6030ea3dd4becd8a07 (diff) | |
| parent | 818b366c3e3645b3375ee0b1d1023621dbeaede2 (diff) | |
| download | rails-5debc65c356c619bce20dcc10c0befc7c4204ef5.tar.gz rails-5debc65c356c619bce20dcc10c0befc7c4204ef5.tar.bz2 rails-5debc65c356c619bce20dcc10c0befc7c4204ef5.zip | |
Merge branch 'master' of github.com:lifo/docrails
Diffstat (limited to 'actionpack/test/template/render_test.rb')
| -rw-r--r-- | actionpack/test/template/render_test.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/actionpack/test/template/render_test.rb b/actionpack/test/template/render_test.rb index d2bf45a63a..8087429d62 100644 --- a/actionpack/test/template/render_test.rb +++ b/actionpack/test/template/render_test.rb @@ -221,6 +221,15 @@ module RenderTestCases "@output_buffer << 'source: #{template.source.inspect}'\n" end + WithViewHandler = lambda do |template, view| + %'"#{template.class} #{view.class}"' + 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) + end + def test_render_inline_with_compilable_custom_type ActionView::Template.register_template_handler :foo, CustomHandler assert_equal 'source: "Hello, World!"', @view.render(:inline => "Hello, World!", :type => :foo) |
