From cce94e7232fdd53d5212d85b6f6ecc411baa0b16 Mon Sep 17 00:00:00 2001 From: Yves Senn Date: Sat, 15 Dec 2012 20:21:40 +0100 Subject: partials inside directory work with `assert_template` previously when a partial was placed inside a directory (eg. '/dir/_partial'), `assert_template` did not replace the '_' prefix when looking through rendered tempaltes, which resulted in an error. I modified it to replace both, the leading '_' and the last '_' after a '/'. --- actionpack/lib/action_view/test_case.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib/action_view/test_case.rb') diff --git a/actionpack/lib/action_view/test_case.rb b/actionpack/lib/action_view/test_case.rb index 1f89e51c66..463f192d0c 100644 --- a/actionpack/lib/action_view/test_case.rb +++ b/actionpack/lib/action_view/test_case.rb @@ -122,7 +122,7 @@ module ActionView class RenderedViewsCollection def initialize - @rendered_views ||= {} + @rendered_views ||= Hash.new { |hash, key| hash[key] = [] } end def add(view, locals) -- cgit v1.2.3