From 692dbbf79387b56e241e1acd05f74f7d71ff79a6 Mon Sep 17 00:00:00 2001 From: Michael Koziarski Date: Wed, 6 Feb 2008 04:26:40 +0000 Subject: Introduce a Template class to ActionView. Closes #11024 [lifofifo] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8805 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/test/controller/custom_handler_test.rb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'actionpack/test/controller/custom_handler_test.rb') diff --git a/actionpack/test/controller/custom_handler_test.rb b/actionpack/test/controller/custom_handler_test.rb index f3f2625daa..932b8c15c3 100644 --- a/actionpack/test/controller/custom_handler_test.rb +++ b/actionpack/test/controller/custom_handler_test.rb @@ -20,14 +20,17 @@ class CustomHandlerTest < Test::Unit::TestCase end def test_custom_render - result = @view.render_template( "foo", "hello <%= one %>", nil, :one => "two" ) + template = ActionView::Template.new(@view, "hello <%= one %>", false, { :one => "two" }, true, "foo") + + result = @view.render_template(template) assert_equal( [ "hello <%= one %>", { :one => "two" }, @view ], result ) end def test_custom_render2 - result = @view.render_template( "foo2", "hello <%= one %>", nil, :one => "two" ) + template = ActionView::Template.new(@view, "hello <%= one %>", false, { :one => "two" }, true, "foo2") + result = @view.render_template(template) assert_equal( [ "hello <%= one %>", { :one => "two" }, @view ], result ) @@ -35,7 +38,8 @@ class CustomHandlerTest < Test::Unit::TestCase 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" ) + template = ActionView::Template.new(@view, "hello <%= one %>", false, { :one => "two" }, true, "bar") + result = @view.render_template(template) assert_equal "hello two", result end end -- cgit v1.2.3