diff options
author | Emilio Tagua <miloops@gmail.com> | 2010-09-28 17:16:18 -0300 |
---|---|---|
committer | Emilio Tagua <miloops@gmail.com> | 2010-09-28 17:16:18 -0300 |
commit | 9917356d66a9dc6d7f8ea864d996faa1f020167d (patch) | |
tree | 979e1885016e1b4f563ca37d5885faecfabcd76e /actionpack | |
parent | 3f94b45262577b70a1d9f3aea45e0e4f07a2bbaa (diff) | |
download | rails-9917356d66a9dc6d7f8ea864d996faa1f020167d.tar.gz rails-9917356d66a9dc6d7f8ea864d996faa1f020167d.tar.bz2 rails-9917356d66a9dc6d7f8ea864d996faa1f020167d.zip |
Remove more warnings by initializing variables in test.
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/test/controller/render_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/actionpack/test/controller/render_test.rb b/actionpack/test/controller/render_test.rb index 5d1341af1b..15e298e5fc 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 @@ -340,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 @@ -356,6 +360,7 @@ class TestController < ActionController::Base end def layout_overriding_layout + @variable_for_layout = nil render :action => "hello_world", :layout => "standard" end @@ -644,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", |