From cecafc52ee0a4a53c903ddbaba95683261f88e5f Mon Sep 17 00:00:00 2001 From: Yehuda Katz + Carl Lerche Date: Thu, 23 Apr 2009 15:58:38 -0700 Subject: Refactor ActionView::Template ActionView::Template is now completely independent from template storage, which allows different back ends such as the database. ActionView::Template's only responsibility is to take in the template source (passed in from ActionView::Path), compile it, and render it. --- actionpack/test/template/render_test.rb | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'actionpack/test/template/render_test.rb') diff --git a/actionpack/test/template/render_test.rb b/actionpack/test/template/render_test.rb index 7191df0dfd..71291f009c 100644 --- a/actionpack/test/template/render_test.rb +++ b/actionpack/test/template/render_test.rb @@ -91,10 +91,6 @@ module RenderTestCases assert_equal "The secret is in the sauce\n", @view.render(:file => "test/dot.directory/render_file_with_ivar") end - def test_render_has_access_current_template - assert_equal "test/template.erb", @view.render(:file => "test/template.erb") - end - def test_render_update # TODO: You should not have to stub out template because template is self! @view.instance_variable_set(:@template, @view) @@ -240,10 +236,6 @@ module RenderTestCases end end - def test_template_with_malformed_template_handler_is_reachable_through_its_exact_filename - assert_equal "Don't render me!", @view.render(:file => 'test/malformed/malformed.html.erb~') - end - def test_render_with_layout assert_equal %(\nHello world!\n), @view.render(:file => "test/hello_world.erb", :layout => "layouts/yield") @@ -269,7 +261,7 @@ class CachedViewRenderTest < ActiveSupport::TestCase # Ensure view path cache is primed def setup view_paths = ActionController::Base.view_paths - assert_equal ActionView::Template::FileSystemPath, view_paths.first.class + assert_equal ActionView::Template::FileSystemPathWithFallback, view_paths.first.class setup_view(view_paths) end end @@ -280,9 +272,9 @@ class LazyViewRenderTest < ActiveSupport::TestCase # Test the same thing as above, but make sure the view path # is not eager loaded def setup - path = ActionView::Template::FileSystemPath.new(FIXTURE_LOAD_PATH) + path = ActionView::Template::FileSystemPathWithFallback.new(FIXTURE_LOAD_PATH) view_paths = ActionView::Base.process_view_paths(path) - assert_equal ActionView::Template::FileSystemPath, view_paths.first.class + assert_equal ActionView::Template::FileSystemPathWithFallback, view_paths.first.class setup_view(view_paths) end end -- cgit v1.2.3