From 7bb486055e62b33547101a10d2505564ff1d004f Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Wed, 15 Jun 2005 17:17:58 +0000 Subject: r1318@iwill: jeremy | 2005-06-15 01:08:22 -0700 Ticket 1394 - Helper isolation r1319@iwill: jeremy | 2005-06-15 01:10:00 -0700 Formulate a test case for helper isolation. r1331@iwill: jeremy | 2005-06-15 15:21:07 -0700 Update changelog r1332@iwill: jeremy | 2005-06-15 15:21:30 -0700 Remove superfluous, broken layout_test r1333@iwill: jeremy | 2005-06-15 15:24:10 -0700 Use an anonymous Module to store helpers per-class instead of tossing them all in template_class. Create a new helper module for subclasses which includes its superclass' helper module. Remove unnecessary ActionView::Base.controller_delegate. Update helper tests. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1425 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/test/controller/layout_test.rb | 49 ------------------------------- 1 file changed, 49 deletions(-) delete mode 100644 actionpack/test/controller/layout_test.rb (limited to 'actionpack/test/controller/layout_test.rb') diff --git a/actionpack/test/controller/layout_test.rb b/actionpack/test/controller/layout_test.rb deleted file mode 100644 index f652453ebd..0000000000 --- a/actionpack/test/controller/layout_test.rb +++ /dev/null @@ -1,49 +0,0 @@ -require File.dirname(__FILE__) + '/../abstract_unit' - -class TestLayoutController < ActionController::Base - layout "layouts/standard" - - def hello_world - end - - def hello_world_outside_layout - end - - def rescue_action(e) raise end -end - -class ChildWithoutTestLayoutController < TestLayoutController - layout nil - - def hello_world - end -end - -class ChildWithOtherTestLayoutController < TestLayoutController - layout nil - - def hello_world - end -end - -class RenderTest < Test::Unit::TestCase - def setup - @request = ActionController::TestRequest.new - @response = ActionController::TestResponse.new - - @request.host = "www.nextangle.com" - end - - def test_layout_rendering - @request.action = "hello_world" - response = process_request - assert_equal "200 OK", response.headers["Status"] - assert_equal "layouts/standard", response.template.template_name - end - - - private - def process_request - TestLayoutController.process(@request, @response) - end -end \ No newline at end of file -- cgit v1.2.3