aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/custom_handler_test.rb
diff options
context:
space:
mode:
authorMichael Koziarski <michael@koziarski.com>2008-02-06 04:26:40 +0000
committerMichael Koziarski <michael@koziarski.com>2008-02-06 04:26:40 +0000
commit692dbbf79387b56e241e1acd05f74f7d71ff79a6 (patch)
tree7d1c1c9f7a8baa517b525a0d02821fd47ca34daf /actionpack/test/controller/custom_handler_test.rb
parent8bc9018882c55cea06d062a9d2d4a32f92b2dc47 (diff)
downloadrails-692dbbf79387b56e241e1acd05f74f7d71ff79a6.tar.gz
rails-692dbbf79387b56e241e1acd05f74f7d71ff79a6.tar.bz2
rails-692dbbf79387b56e241e1acd05f74f7d71ff79a6.zip
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
Diffstat (limited to 'actionpack/test/controller/custom_handler_test.rb')
-rw-r--r--actionpack/test/controller/custom_handler_test.rb10
1 files changed, 7 insertions, 3 deletions
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