aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2008-10-28 11:06:08 -0500
committerJoshua Peek <josh@joshpeek.com>2008-10-28 11:06:08 -0500
commitac50ee0edfa0df90ae7a8dd09f4a41ecbd1c7a94 (patch)
tree5520adefae997928b844fb456fd106b3c08de6cd /actionpack/test/template
parent0f651aec4eb4630945d02571fe542414ef628c5c (diff)
downloadrails-ac50ee0edfa0df90ae7a8dd09f4a41ecbd1c7a94.tar.gz
rails-ac50ee0edfa0df90ae7a8dd09f4a41ecbd1c7a94.tar.bz2
rails-ac50ee0edfa0df90ae7a8dd09f4a41ecbd1c7a94.zip
Track rendered templates in stack so the current template can always be accessed. Added ActionView::Base#template to access the template object.
Diffstat (limited to 'actionpack/test/template')
-rw-r--r--actionpack/test/template/render_test.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/actionpack/test/template/render_test.rb b/actionpack/test/template/render_test.rb
index a4ea22ddcb..7e4fff3da6 100644
--- a/actionpack/test/template/render_test.rb
+++ b/actionpack/test/template/render_test.rb
@@ -41,6 +41,10 @@ class ViewRenderTest < Test::Unit::TestCase
assert_equal "The secret is in the sauce\n", @view.render("test/dot.directory/render_file_with_ivar")
end
+ def test_render_has_access_current_template
+ assert_equal "test/template.erb", @view.render("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)