From 8ffc2e3b8de38c485fa24820208b40920dad7ae3 Mon Sep 17 00:00:00 2001 From: Erik Ostrom Date: Mon, 28 Sep 2009 13:31:30 -0500 Subject: Ported the new ActionView::TestCase from 2-3-stable to master [#3260 state:resolved] The test case now mimicks the template environment more closely, so it's possible to use render, load helper dependencies. This also fixes assert_select, and similar assertions. Because view tests and helpers generally don't render full templates assert_select looks first in rendered and then in output_buffer to find the rendered output. Additional `master'-only changes: Made the Action Pack Rakefile run the ActionView::TestCase tests, and made ActionView::Rendering#_render_text always return a string. Signed-off-by: Joshua Peek --- actionpack/lib/action_view/render/rendering.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'actionpack/lib/action_view/render') diff --git a/actionpack/lib/action_view/render/rendering.rb b/actionpack/lib/action_view/render/rendering.rb index 8b0d4cc627..0cab035ede 100644 --- a/actionpack/lib/action_view/render/rendering.rb +++ b/actionpack/lib/action_view/render/rendering.rb @@ -89,6 +89,7 @@ module ActionView def _render_text(text, layout, options) text = layout.render(self, options[:locals]) { text } if layout + text end # This is the API to render a ViewContext's template from a controller. -- cgit v1.2.3