aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/render_test.rb
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2010-09-29 10:04:42 +0200
committerJosé Valim <jose.valim@gmail.com>2010-09-29 10:04:42 +0200
commit0bbf9029e8089356aed0e3be2f859d56951a89cf (patch)
tree38e41ef8b63140a91c828bec03e06e83f38899b6 /actionpack/test/controller/render_test.rb
parent006cef7107b648882cfc09f56904c601454cfc77 (diff)
parent17599abc9c06f30ff23d7ad47a3f029e32c26c88 (diff)
downloadrails-0bbf9029e8089356aed0e3be2f859d56951a89cf.tar.gz
rails-0bbf9029e8089356aed0e3be2f859d56951a89cf.tar.bz2
rails-0bbf9029e8089356aed0e3be2f859d56951a89cf.zip
Merge remote branch 'miloops/warnings'
Diffstat (limited to 'actionpack/test/controller/render_test.rb')
-rw-r--r--actionpack/test/controller/render_test.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/actionpack/test/controller/render_test.rb b/actionpack/test/controller/render_test.rb
index 42723c834e..7ca784c467 100644
--- a/actionpack/test/controller/render_test.rb
+++ b/actionpack/test/controller/render_test.rb
@@ -276,6 +276,7 @@ class TestController < ActionController::Base
# :ported:
def builder_layout_test
+ @name = nil
render :action => "hello", :layout => "layouts/builder"
end
@@ -327,6 +328,7 @@ class TestController < ActionController::Base
end
def default_render
+ @alternate_default_render ||= nil
if @alternate_default_render
@alternate_default_render.call
else
@@ -339,14 +341,17 @@ class TestController < ActionController::Base
end
def layout_test_with_different_layout
+ @variable_for_layout = nil
render :action => "hello_world", :layout => "standard"
end
def layout_test_with_different_layout_and_string_action
+ @variable_for_layout = nil
render "hello_world", :layout => "standard"
end
def layout_test_with_different_layout_and_symbol_action
+ @variable_for_layout = nil
render :hello_world, :layout => "standard"
end
@@ -355,6 +360,7 @@ class TestController < ActionController::Base
end
def layout_overriding_layout
+ @variable_for_layout = nil
render :action => "hello_world", :layout => "standard"
end
@@ -643,6 +649,7 @@ class TestController < ActionController::Base
private
def determine_layout
+ @variable_for_layout ||= nil
case action_name
when "hello_world", "layout_test", "rendering_without_layout",
"rendering_nothing_on_layout", "render_text_hello_world",
@@ -1020,7 +1027,7 @@ class RenderTest < ActionController::TestCase
assert_equal " ", @response.body
end
- def test_render_to_string
+ def test_render_to_string_not_deprecated
assert_not_deprecated { get :hello_in_a_string }
assert_equal "How's there? goodbyeHello: davidHello: marygoodbye\n", @response.body
end