diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2008-05-01 10:21:46 +0100 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2008-05-01 10:21:46 +0100 |
commit | 74436d2203eba186baebc1ddc82ff2202d0fc005 (patch) | |
tree | e5a8b5297edec740d5121275d19af7805a32bae0 /actionpack/test/controller | |
parent | 6f20efdaf733db26fbf337da73121983785064d5 (diff) | |
download | rails-74436d2203eba186baebc1ddc82ff2202d0fc005.tar.gz rails-74436d2203eba186baebc1ddc82ff2202d0fc005.tar.bz2 rails-74436d2203eba186baebc1ddc82ff2202d0fc005.zip |
Fixed render :template for templates in top level of view path. [#54 state:resolved]
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r-- | actionpack/test/controller/render_test.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/actionpack/test/controller/render_test.rb b/actionpack/test/controller/render_test.rb index 7491f16a84..066fa6acd4 100644 --- a/actionpack/test/controller/render_test.rb +++ b/actionpack/test/controller/render_test.rb @@ -23,6 +23,14 @@ class TestController < ActionController::Base def render_hello_world_with_forward_slash render :template => "/test/hello_world" end + + def render_template_in_top_directory + render :template => 'shared' + end + + def render_template_in_top_directory_with_slash + render :template => '/shared' + end def render_hello_world_from_variable @person = "david" @@ -243,6 +251,18 @@ class RenderTest < Test::Unit::TestCase get :render_hello_world_with_forward_slash assert_template "test/hello_world" end + + def test_render_in_top_directory + get :render_template_in_top_directory + assert_template "shared" + assert_equal "Elastica", @response.body + end + + def test_render_in_top_directory_with_slash + get :render_template_in_top_directory_with_slash + assert_template "shared" + assert_equal "Elastica", @response.body + end def test_render_from_variable get :render_hello_world_from_variable |