aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/abstract_controller/layouts_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/abstract_controller/layouts_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/abstract_controller/layouts_test.rb')
-rw-r--r--actionpack/test/abstract_controller/layouts_test.rb13
1 files changed, 11 insertions, 2 deletions
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