diff options
author | Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com> | 2009-05-13 17:00:36 -0700 |
---|---|---|
committer | Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com> | 2009-05-13 17:00:59 -0700 |
commit | 49a84ff69ca4fc4db821ca3b5a5926d07832c845 (patch) | |
tree | 9161f1f963afaacd7cae93e8226dfc7644ce2721 /actionpack/test/new_base/render_layout_test.rb | |
parent | 4f291fa528e5faad03def69ae7ac98224ab859db (diff) | |
download | rails-49a84ff69ca4fc4db821ca3b5a5926d07832c845.tar.gz rails-49a84ff69ca4fc4db821ca3b5a5926d07832c845.tar.bz2 rails-49a84ff69ca4fc4db821ca3b5a5926d07832c845.zip |
Ported over render :file tests.
Diffstat (limited to 'actionpack/test/new_base/render_layout_test.rb')
-rw-r--r-- | actionpack/test/new_base/render_layout_test.rb | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/actionpack/test/new_base/render_layout_test.rb b/actionpack/test/new_base/render_layout_test.rb index 5d28926cc6..7f627f86ec 100644 --- a/actionpack/test/new_base/render_layout_test.rb +++ b/actionpack/test/new_base/render_layout_test.rb @@ -6,7 +6,8 @@ module ControllerLayouts self.view_paths = [ActionView::Template::FixturePath.new( "layouts/application.html.erb" => "OMG <%= yield %> KTHXBAI", "layouts/override.html.erb" => "Override! <%= yield %>", - "basic.html.erb" => "Hello world!" + "basic.html.erb" => "Hello world!", + "controller_layouts/implicit/layout_false.html.erb" => "hai(layout_false.html.erb)" )] def index @@ -17,6 +18,12 @@ module ControllerLayouts render :template => "basic", :layout => "override" end + def layout_false + render :layout => false + end + + + def builder_override end @@ -56,4 +63,13 @@ module ControllerLayouts get "/controller_layouts/implicit/override" assert_body "Override! Hello world!" end + + class TestLayoutOptions < SimpleRouteCase + testing ControllerLayouts::ImplicitController + + test "rendering with :layout => false leaves out the implicit layout" do + get :layout_false + assert_response "hai(layout_false.html.erb)" + end + end end
\ No newline at end of file |