aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/abstract/layouts_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/abstract/layouts_test.rb')
-rw-r--r--actionpack/test/abstract/layouts_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/actionpack/test/abstract/layouts_test.rb b/actionpack/test/abstract/layouts_test.rb
index 92baad4523..4a05c00f8b 100644
--- a/actionpack/test/abstract/layouts_test.rb
+++ b/actionpack/test/abstract/layouts_test.rb
@@ -8,6 +8,8 @@ module AbstractControllerTests
include AbstractController::Rendering
include AbstractController::Layouts
+ abstract!
+
self.view_paths = [ActionView::FixtureResolver.new(
"layouts/hello.erb" => "With String <%= yield %>",
"layouts/hello_override.erb" => "With Override <%= yield %>",
@@ -251,6 +253,10 @@ module AbstractControllerTests
assert_equal "Hello nil!", controller.response_body
end
+ test "when layout is specified as a proc, do not leak any methods into controller's action_methods" do
+ assert_equal Set.new(['index']), WithProc.action_methods
+ end
+
test "when layout is specified as a proc, call it and use the layout returned" do
controller = WithProc.new
controller.process(:index)