diff options
author | José Valim <jose.valim@gmail.com> | 2010-09-29 10:04:42 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-09-29 10:04:42 +0200 |
commit | 0bbf9029e8089356aed0e3be2f859d56951a89cf (patch) | |
tree | 38e41ef8b63140a91c828bec03e06e83f38899b6 /actionpack/test/controller | |
parent | 006cef7107b648882cfc09f56904c601454cfc77 (diff) | |
parent | 17599abc9c06f30ff23d7ad47a3f029e32c26c88 (diff) | |
download | rails-0bbf9029e8089356aed0e3be2f859d56951a89cf.tar.gz rails-0bbf9029e8089356aed0e3be2f859d56951a89cf.tar.bz2 rails-0bbf9029e8089356aed0e3be2f859d56951a89cf.zip |
Merge remote branch 'miloops/warnings'
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r-- | actionpack/test/controller/action_pack_assertions_test.rb | 4 | ||||
-rw-r--r-- | actionpack/test/controller/caching_test.rb | 1 | ||||
-rw-r--r-- | actionpack/test/controller/capture_test.rb | 4 | ||||
-rw-r--r-- | actionpack/test/controller/filters_test.rb | 2 | ||||
-rw-r--r-- | actionpack/test/controller/render_other_test.rb | 1 | ||||
-rw-r--r-- | actionpack/test/controller/render_test.rb | 9 | ||||
-rw-r--r-- | actionpack/test/controller/rescue_test.rb | 2 | ||||
-rw-r--r-- | actionpack/test/controller/webservice_test.rb | 1 |
8 files changed, 20 insertions, 4 deletions
diff --git a/actionpack/test/controller/action_pack_assertions_test.rb b/actionpack/test/controller/action_pack_assertions_test.rb index a0092a9f73..d9d258e593 100644 --- a/actionpack/test/controller/action_pack_assertions_test.rb +++ b/actionpack/test/controller/action_pack_assertions_test.rb @@ -234,13 +234,13 @@ class ActionPackAssertionsControllerTest < ActionController::TestCase def test_template_objects_exist process :assign_this - assert !@controller.instance_variable_get(:"@hi") + assert !@controller.instance_variable_defined?(:"@hi") assert @controller.instance_variable_get(:"@howdy") end def test_template_objects_missing process :nothing - assert_nil @controller.instance_variable_get(:@howdy) + assert !@controller.instance_variable_defined?(:@howdy) end def test_empty_flash diff --git a/actionpack/test/controller/caching_test.rb b/actionpack/test/controller/caching_test.rb index 8030499235..914ae56032 100644 --- a/actionpack/test/controller/caching_test.rb +++ b/actionpack/test/controller/caching_test.rb @@ -185,6 +185,7 @@ class ActionCachingTestController < CachingController def with_layout @cache_this = MockTime.now.to_f.to_s + @title = nil render :text => @cache_this, :layout => true end diff --git a/actionpack/test/controller/capture_test.rb b/actionpack/test/controller/capture_test.rb index 47253f22b8..eb426e855b 100644 --- a/actionpack/test/controller/capture_test.rb +++ b/actionpack/test/controller/capture_test.rb @@ -6,18 +6,22 @@ class CaptureController < ActionController::Base def self.controller_path; "test"; end def content_for + @title = nil render :layout => "talk_from_action" end def content_for_with_parameter + @title = nil render :layout => "talk_from_action" end def content_for_concatenated + @title = nil render :layout => "talk_from_action" end def non_erb_block_content_for + @title = nil render :layout => "talk_from_action" end diff --git a/actionpack/test/controller/filters_test.rb b/actionpack/test/controller/filters_test.rb index cf4a461622..d13ebc705a 100644 --- a/actionpack/test/controller/filters_test.rb +++ b/actionpack/test/controller/filters_test.rb @@ -669,7 +669,7 @@ class FilterTest < ActionController::TestCase assert_equal %w( ensure_login find_user ), assigns["ran_filter"] test_process(ConditionalSkippingController, "login") - assert_nil @controller.instance_variable_get("@ran_after_filter") + assert !@controller.instance_variable_defined?("@ran_after_filter") test_process(ConditionalSkippingController, "change_password") assert_equal %w( clean_up ), @controller.instance_variable_get("@ran_after_filter") end diff --git a/actionpack/test/controller/render_other_test.rb b/actionpack/test/controller/render_other_test.rb index 3117be6e81..eda777e7a7 100644 --- a/actionpack/test/controller/render_other_test.rb +++ b/actionpack/test/controller/render_other_test.rb @@ -120,6 +120,7 @@ class RenderOtherTest < ActionController::TestCase private def default_render + @alternate_default_render ||= nil if @alternate_default_render @alternate_default_render.call else 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 diff --git a/actionpack/test/controller/rescue_test.rb b/actionpack/test/controller/rescue_test.rb index cefbc548c0..a2418bb7c0 100644 --- a/actionpack/test/controller/rescue_test.rb +++ b/actionpack/test/controller/rescue_test.rb @@ -3,10 +3,12 @@ require 'abstract_unit' module ActionDispatch class ShowExceptions private + remove_method :public_path def public_path "#{FIXTURE_LOAD_PATH}/public" end + remove_method :logger # Silence logger def logger nil diff --git a/actionpack/test/controller/webservice_test.rb b/actionpack/test/controller/webservice_test.rb index 5564775a48..6ba4c6c48d 100644 --- a/actionpack/test/controller/webservice_test.rb +++ b/actionpack/test/controller/webservice_test.rb @@ -24,6 +24,7 @@ class WebServiceTest < ActionDispatch::IntegrationTest def setup @controller = TestController.new + @integration_session = nil end def test_check_parameters |