aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/controller/new_base/render_test.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/actionpack/test/controller/new_base/render_test.rb b/actionpack/test/controller/new_base/render_test.rb
index a520934c5b..f5baa829b6 100644
--- a/actionpack/test/controller/new_base/render_test.rb
+++ b/actionpack/test/controller/new_base/render_test.rb
@@ -53,6 +53,10 @@ module Render
prepend_view_path ActionView::FixtureResolver.new("render/child_render/overriden_with_own_view_paths_prepended.html.erb" => "child content")
end
+ class ChildRenderWithoutInheritanceController < BlankRenderController
+ config.template_inheritance = false
+ end
+
class RenderTest < Rack::TestCase
test "render with blank" do
with_routing do |set|
@@ -135,4 +139,11 @@ module Render
end
end
+ class TestNoViewInheritance < Rack::TestCase
+ test "Template from parent controller does not get picked if config.action_controller.template_inheritance = false" do
+ assert_raises(ActionView::MissingTemplate) do
+ get "/render/child_render_without_inheritance/index", {}, "action_dispatch.show_exceptions" => false
+ end
+ end
+ end
end