aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r--actionpack/test/controller/render_test.rb20
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