aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/new_base/render_action_test.rb
diff options
context:
space:
mode:
authorYehuda Katz and Carl Lerche <wycats@gmail.com>2009-04-07 17:57:20 -0700
committerYehuda Katz and Carl Lerche <wycats@gmail.com>2009-04-07 17:57:20 -0700
commit3cecbc21e37f772a72917f80c53a7645f81d94c5 (patch)
treefbdb4e9a6934e066ecc14e06b7f76202d54e29b1 /actionpack/test/new_base/render_action_test.rb
parent95c9718118bc0342ddb320f23b5e0a17fb12b7ad (diff)
downloadrails-3cecbc21e37f772a72917f80c53a7645f81d94c5.tar.gz
rails-3cecbc21e37f772a72917f80c53a7645f81d94c5.tar.bz2
rails-3cecbc21e37f772a72917f80c53a7645f81d94c5.zip
Get Base2 layouts to work :)
Diffstat (limited to 'actionpack/test/new_base/render_action_test.rb')
-rw-r--r--actionpack/test/new_base/render_action_test.rb12
1 files changed, 7 insertions, 5 deletions
diff --git a/actionpack/test/new_base/render_action_test.rb b/actionpack/test/new_base/render_action_test.rb
index bbc8939af4..2bfb374a31 100644
--- a/actionpack/test/new_base/render_action_test.rb
+++ b/actionpack/test/new_base/render_action_test.rb
@@ -91,7 +91,9 @@ module RenderAction
describe "rendering a normal template with full path with layout => true"
test "raises an exception when requesting a layout and none exist" do
- assert_raise(ActionView::MissingTemplate) { get "/render_action/basic/hello_world_with_layout" }
+ assert_raise(ArgumentError, /no default layout for RenderAction::BasicController in/) do
+ get "/render_action/basic/hello_world_with_layout"
+ end
end
end
@@ -124,13 +126,13 @@ end
module RenderActionWithApplicationLayout
# # ==== Render actions with layouts ====
-
- class BasicController < ActionController::Base2
+
+ class BasicController < ::ApplicationController
# Set the view path to an application view structure with layouts
self.view_paths = self.view_paths = [ActionView::FixtureTemplate::FixturePath.new(
"render_action_with_application_layout/basic/hello_world.html.erb" => "Hello World!",
- "layouts/application.html.erb" => "OHAI <%= yield %> KTHXBAI",
- "layouts/greetings.html.erb" => "Greetings <%= yield %> Bai"
+ "layouts/application.html.erb" => "OHAI <%= yield %> KTHXBAI",
+ "layouts/greetings.html.erb" => "Greetings <%= yield %> Bai"
)]
def hello_world