From bebaccdf4a3a17f2ead349cca891032e245655ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Sun, 1 May 2011 11:14:38 +0200 Subject: Remove dependency from _template. --- actionpack/test/template/template_test.rb | 10 ++++------ actionpack/test/template/url_helper_test.rb | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-) (limited to 'actionpack/test/template') diff --git a/actionpack/test/template/template_test.rb b/actionpack/test/template/template_test.rb index 5c655d5b69..81fb34b80f 100644 --- a/actionpack/test/template/template_test.rb +++ b/actionpack/test/template/template_test.rb @@ -11,11 +11,9 @@ class TestERBTemplate < ActiveSupport::TestCase end class Context - attr_accessor :_template - def initialize @output_buffer = "original" - @_virtual_path = nil + @virtual_path = nil end def hello @@ -24,7 +22,7 @@ class TestERBTemplate < ActiveSupport::TestCase def partial ActionView::Template.new( - "<%= @_template.virtual_path %>", + "<%= @virtual_path %>", "partial", ERBHandler, :virtual_path => "partial" @@ -86,9 +84,9 @@ class TestERBTemplate < ActiveSupport::TestCase end def test_virtual_path - @template = new_template("<%= @_template.virtual_path %>" \ + @template = new_template("<%= @virtual_path %>" \ "<%= partial.render(self, {}) %>" \ - "<%= @_template.virtual_path %>") + "<%= @virtual_path %>") assert_equal "hellopartialhello", render end diff --git a/actionpack/test/template/url_helper_test.rb b/actionpack/test/template/url_helper_test.rb index fc330f7a73..8d0f0124c2 100644 --- a/actionpack/test/template/url_helper_test.rb +++ b/actionpack/test/template/url_helper_test.rb @@ -9,7 +9,7 @@ class UrlHelperTest < ActiveSupport::TestCase # or request. # # In those cases, we'll set up a simple mock - attr_accessor :controller, :request, :_template + attr_accessor :controller, :request routes = ActionDispatch::Routing::RouteSet.new routes.draw do -- cgit v1.2.3