aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/template_test.rb
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2011-05-01 11:14:38 +0200
committerJosé Valim <jose.valim@gmail.com>2011-05-01 13:40:12 +0200
commitbebaccdf4a3a17f2ead349cca891032e245655ff (patch)
treeb0c1e7f663862251b58248a520478a99ed503635 /actionpack/test/template/template_test.rb
parentd08f65118cc328de5493a68db33a155487f5fceb (diff)
downloadrails-bebaccdf4a3a17f2ead349cca891032e245655ff.tar.gz
rails-bebaccdf4a3a17f2ead349cca891032e245655ff.tar.bz2
rails-bebaccdf4a3a17f2ead349cca891032e245655ff.zip
Remove dependency from _template.
Diffstat (limited to 'actionpack/test/template/template_test.rb')
-rw-r--r--actionpack/test/template/template_test.rb10
1 files changed, 4 insertions, 6 deletions
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