提交 0fb850ab 编写于 作者: J Justin Collins

Add test for multiple render paths

This tests when you have a partial that is rendered from
more than one controller action, which in the past would cause
rendered partials to be overwritten, possibly hiding warnings
上级 5da772f8
......@@ -26,4 +26,14 @@ class OtherController < ApplicationController
def g
@g = params[:bad]
end
def test_partial1
@a = params[:bad!]
render :test_partial
end
def test_partial2
@b = params[:badder!]
render :test_partial
end
end
......@@ -13,6 +13,8 @@ Rails31::Application.routes.draw do
get 'b'
post 'something' => 'c'
put 'dee', :to => :d
get 'test_partial1'
get 'test_partial2'
end
match 'e', :to => 'other#e', :as => 'eeeee'
......
......@@ -13,7 +13,7 @@ class Rails31Tests < Test::Unit::TestCase
def expected
@expected ||= {
:model => 0,
:template => 12,
:template => 14,
:controller => 1,
:warning => 48 }
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册