aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r--actionpack/test/controller/custom_handler_test.rb10
-rw-r--r--actionpack/test/controller/render_test.rb13
2 files changed, 7 insertions, 16 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
diff --git a/actionpack/test/controller/render_test.rb b/actionpack/test/controller/render_test.rb
index 4768dffba2..01a7ad6eec 100644
--- a/actionpack/test/controller/render_test.rb
+++ b/actionpack/test/controller/render_test.rb
@@ -140,14 +140,6 @@ class TestController < ActionController::Base
:locals => { :local_name => name }
end
- def accessing_local_assigns_in_inline_template_with_string_keys
- name = params[:local_name]
- ActionView::Base.local_assigns_support_string_keys = true
- render :inline => "<%= 'Goodbye, ' + local_name %>",
- :locals => { "local_name" => name }
- ActionView::Base.local_assigns_support_string_keys = false
- end
-
def formatted_html_erb
end
@@ -387,11 +379,6 @@ class RenderTest < Test::Unit::TestCase
assert_equal "Goodbye, Local David", @response.body
end
- def test_accessing_local_assigns_in_inline_template_with_string_keys
- get :accessing_local_assigns_in_inline_template_with_string_keys, :local_name => "Local David"
- assert_equal "Goodbye, Local David", @response.body
- end
-
def test_render_200_should_set_etag
get :render_hello_world_from_variable
assert_equal etag_for("hello david"), @response.headers['ETag']