diff options
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/controller/new_render_test.rb | 12 | ||||
-rw-r--r-- | actionpack/test/controller/render_test.rb | 14 |
2 files changed, 11 insertions, 15 deletions
diff --git a/actionpack/test/controller/new_render_test.rb b/actionpack/test/controller/new_render_test.rb index 9ec3f283cf..47db7136f4 100644 --- a/actionpack/test/controller/new_render_test.rb +++ b/actionpack/test/controller/new_render_test.rb @@ -94,6 +94,10 @@ class NewRenderTestController < ActionController::Base render :inline => "Hello: <%= params[:name] %>", :layout => nil end + def render_with_explicit_template + render "test/hello_world" + end + def rescue_action(e) raise end private @@ -103,7 +107,8 @@ class NewRenderTestController < ActionController::Base "rendering_nothing_on_layout", "render_text_hello_world", "partial_only", "partial_only_with_layout", "accessing_params_in_template", - "accessing_params_in_template_with_layout" + "accessing_params_in_template_with_layout", + "render_with_explicit_template" "layouts/standard" when "builder_layout_test" "layouts/builder" @@ -249,4 +254,9 @@ class NewRenderTest < Test::Unit::TestCase get :accessing_params_in_template_with_layout, :name => "David" assert_equal "<html>Hello: David</html>", @response.body end + + def test_render_with_explicit_template + get :render_with_explicit_template + assert_response :success + end end diff --git a/actionpack/test/controller/render_test.rb b/actionpack/test/controller/render_test.rb index 98d279055d..2dab50c9df 100644 --- a/actionpack/test/controller/render_test.rb +++ b/actionpack/test/controller/render_test.rb @@ -88,20 +88,6 @@ end TestController.template_root = File.dirname(__FILE__) + "/../fixtures/" Fun::GamesController.template_root = File.dirname(__FILE__) + "/../fixtures/" -class TestLayoutController < ActionController::Base - layout "layouts/standard" - - def hello_world - end - - def hello_world_outside_layout - end - - def rescue_action(e) - raise unless ActionController::MissingTemplate === e - end -end - class RenderTest < Test::Unit::TestCase def setup @request = ActionController::TestRequest.new |