From 3cecbc21e37f772a72917f80c53a7645f81d94c5 Mon Sep 17 00:00:00 2001 From: Yehuda Katz and Carl Lerche Date: Tue, 7 Apr 2009 17:57:20 -0700 Subject: Get Base2 layouts to work :) --- actionpack/test/abstract_controller/layouts_test.rb | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'actionpack/test/abstract_controller/layouts_test.rb') diff --git a/actionpack/test/abstract_controller/layouts_test.rb b/actionpack/test/abstract_controller/layouts_test.rb index 541d126958..5dd68ec28e 100644 --- a/actionpack/test/abstract_controller/layouts_test.rb +++ b/actionpack/test/abstract_controller/layouts_test.rb @@ -144,7 +144,6 @@ module AbstractControllerTests AbstractController::Base.subclasses.each do |klass| klass = klass.constantize next unless klass < AbstractController::Layouts - p klass klass.class_eval do _write_layout_method end @@ -217,7 +216,17 @@ module AbstractControllerTests "parent has specified a layout, use the child controller layout" do result = WithChildOfImplied.process(:index) assert_equal "With Implied Hello string!", result.response_obj[:body] - end + end + + test "raises an exception when specifying layout true" do + assert_raises ArgumentError do + Object.class_eval <<-RUBY_EVAL, __FILE__, __LINE__ + 1 + class ::BadOmgFailLolLayout < AbstractControllerTests::Layouts::Base + layout true + end + RUBY_EVAL + end + end end end end \ No newline at end of file -- cgit v1.2.3