aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/layout_test.rb
diff options
context:
space:
mode:
authorRizwan Reza <rizwanreza@gmail.com>2010-03-28 12:04:00 +0430
committerRizwan Reza <rizwanreza@gmail.com>2010-03-28 12:04:00 +0430
commitb4c91de9462f59d6395c7c871aafa3301afdc383 (patch)
treefadcaf603a6f473e8ccd52070a1f3b4f957c34cb /actionpack/test/controller/layout_test.rb
parent4b4f69b9bfbd33556e23262f57cf6d944dfd9f63 (diff)
parent66d57d7ba83df52ff1e0485c89f6192c2f84c6b8 (diff)
downloadrails-b4c91de9462f59d6395c7c871aafa3301afdc383.tar.gz
rails-b4c91de9462f59d6395c7c871aafa3301afdc383.tar.bz2
rails-b4c91de9462f59d6395c7c871aafa3301afdc383.zip
Merge remote branch 'rails/master'
Diffstat (limited to 'actionpack/test/controller/layout_test.rb')
-rw-r--r--actionpack/test/controller/layout_test.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/actionpack/test/controller/layout_test.rb b/actionpack/test/controller/layout_test.rb
index f635253156..4d687c1ec6 100644
--- a/actionpack/test/controller/layout_test.rb
+++ b/actionpack/test/controller/layout_test.rb
@@ -120,19 +120,19 @@ class LayoutSetInResponseTest < ActionController::TestCase
def test_layout_set_when_using_default_layout
@controller = DefaultLayoutController.new
get :hello
- assert @controller.template.layout.include?('layouts/layout_test')
+ assert_template :layout => "layouts/layout_test"
end
def test_layout_set_when_set_in_controller
@controller = HasOwnLayoutController.new
get :hello
- assert @controller.template.layout.include?('layouts/item')
+ assert_template :layout => "layouts/item"
end
def test_layout_only_exception_when_included
@controller = OnlyLayoutController.new
get :hello
- assert @controller.template.layout.include?('layouts/item')
+ assert_template :layout => "layouts/item"
end
def test_layout_only_exception_when_excepted
@@ -144,7 +144,7 @@ class LayoutSetInResponseTest < ActionController::TestCase
def test_layout_except_exception_when_included
@controller = ExceptLayoutController.new
get :hello
- assert @controller.template.layout.include?('layouts/item')
+ assert_template :layout => "layouts/item"
end
def test_layout_except_exception_when_excepted
@@ -156,19 +156,19 @@ class LayoutSetInResponseTest < ActionController::TestCase
def test_layout_set_when_using_render
@controller = SetsLayoutInRenderController.new
get :hello
- assert @controller.template.layout.include?('layouts/third_party_template_library')
+ assert_template :layout => "layouts/third_party_template_library"
end
def test_layout_is_not_set_when_none_rendered
@controller = RendersNoLayoutController.new
get :hello
- assert_nil @controller.template.layout
+ assert_template :layout => nil
end
def test_layout_is_picked_from_the_controller_instances_view_path
@controller = PrependsViewPathController.new
get :hello
- assert @controller.template.layout =~ /layouts\/alt\.\w+/
+ assert_template :layout => /layouts\/alt\.\w+/
end
def test_absolute_pathed_layout
@@ -219,7 +219,7 @@ unless RUBY_PLATFORM =~ /(:?mswin|mingw|bccwin)/
@controller = LayoutSymlinkedTest.new
get :hello
assert_response 200
- assert @controller.template.layout.include?("layouts/symlinked/symlinked_layout")
+ assert_template :layout => "layouts/symlinked/symlinked_layout"
end
end
end