aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller
diff options
context:
space:
mode:
authorRick Olson <technoweenie@gmail.com>2007-05-24 16:42:10 +0000
committerRick Olson <technoweenie@gmail.com>2007-05-24 16:42:10 +0000
commit4b9e67c5b9d9f751d633c787d24a1491f3ef498e (patch)
tree3c38ead0fc84c43cdf24ec42abc1a9d6584b5862 /actionpack/test/controller
parentda7f9f516a8f34303ae08a9b89502757b41a578a (diff)
downloadrails-4b9e67c5b9d9f751d633c787d24a1491f3ef498e.tar.gz
rails-4b9e67c5b9d9f751d633c787d24a1491f3ef498e.tar.bz2
rails-4b9e67c5b9d9f751d633c787d24a1491f3ef498e.zip
catch possible WSOD when trying to render a missing partial. Closes #8454 [Catfish]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6826 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r--actionpack/test/controller/new_render_test.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/actionpack/test/controller/new_render_test.rb b/actionpack/test/controller/new_render_test.rb
index 3fade1c7b8..4f2b062fa2 100644
--- a/actionpack/test/controller/new_render_test.rb
+++ b/actionpack/test/controller/new_render_test.rb
@@ -163,6 +163,10 @@ class NewRenderTestController < ActionController::Base
render :partial => "customer"
end
+ def missing_partial
+ render :partial => 'thisFileIsntHere'
+ end
+
def hello_in_a_string
@customers = [ Customer.new("david"), Customer.new("mary") ]
render :text => "How's there? #{render_to_string("test/list")}"
@@ -682,6 +686,12 @@ EOS
assert_equal "Hello: Marcel", @response.body
end
+ def test_render_missing_partial_template
+ assert_raises(ActionView::ActionViewError) do
+ get :missing_partial
+ end
+ end
+
def test_render_text_with_assigns
get :render_text_with_assigns
assert_equal "world", assigns["hello"]