diff options
Diffstat (limited to 'actionpack/test/abstract_controller/layouts_test.rb')
-rw-r--r-- | actionpack/test/abstract_controller/layouts_test.rb | 13 |
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 |