aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/new_render_test.rb
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2006-03-12 03:39:58 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2006-03-12 03:39:58 +0000
commitde660957a50227ef71a7c16524ccec2c45b980b5 (patch)
tree6d864ad49e05350ebc6fc33d788edc5f1fc8ee72 /actionpack/test/controller/new_render_test.rb
parent6e3e5cadfbd7db407364bf2571a5003cf3733480 (diff)
downloadrails-de660957a50227ef71a7c16524ccec2c45b980b5.tar.gz
rails-de660957a50227ef71a7c16524ccec2c45b980b5.tar.bz2
rails-de660957a50227ef71a7c16524ccec2c45b980b5.zip
Added defaults to respond_to [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3842 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test/controller/new_render_test.rb')
-rw-r--r--actionpack/test/controller/new_render_test.rb19
1 files changed, 18 insertions, 1 deletions
diff --git a/actionpack/test/controller/new_render_test.rb b/actionpack/test/controller/new_render_test.rb
index 8359e190a0..5bdb8ec7f8 100644
--- a/actionpack/test/controller/new_render_test.rb
+++ b/actionpack/test/controller/new_render_test.rb
@@ -184,6 +184,14 @@ class NewRenderTestController < ActionController::Base
render :action => "potential_conflicts"
end
+ def hello_world_from_rxml_using_action
+ render :action => "hello_world.rxml"
+ end
+
+ def hello_world_from_rxml_using_template
+ render :template => "test/hello_world.rxml"
+ end
+
helper NewRenderTestHelper
helper do
def rjs_helper_method(value)
@@ -560,4 +568,13 @@ EOS
get :yield_content_for
assert_equal "<title>Putting stuff in the title!</title>\n\nGreat stuff!\n", @response.body
end
-end
+
+
+ def test_overwritting_rendering_relative_file_with_extension
+ get :hello_world_from_rxml_using_template
+ assert_equal "<html>\n <p>Hello</p>\n</html>\n", @response.body
+
+ get :hello_world_from_rxml_using_action
+ assert_equal "<html>\n <p>Hello</p>\n</html>\n", @response.body
+ end
+end \ No newline at end of file