From 0c08d8bd758a15b137ba3523c3cde8b371cf725a Mon Sep 17 00:00:00 2001 From: Emilio Tagua Date: Tue, 28 Sep 2010 18:25:52 -0300 Subject: Fix more warnings by defining variables and using instance_variable_defined? instead instance_variable_get. --- actionpack/test/abstract/callbacks_test.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'actionpack') diff --git a/actionpack/test/abstract/callbacks_test.rb b/actionpack/test/abstract/callbacks_test.rb index b2d4d5f79a..2d02078020 100644 --- a/actionpack/test/abstract/callbacks_test.rb +++ b/actionpack/test/abstract/callbacks_test.rb @@ -47,6 +47,7 @@ module AbstractController end def index + @text ||= nil self.response_body = @text.to_s end end @@ -152,7 +153,7 @@ module AbstractController test "when :except is specified, an after filter is not triggered on that action" do result = @controller.process(:index) - assert_nil @controller.instance_variable_get("@authenticated") + assert !@controller.instance_variable_defined?("@authenticated") end end @@ -196,7 +197,7 @@ module AbstractController test "when :except is specified with an array, an after filter is not triggered on that action" do result = @controller.process(:index) - assert_nil @controller.instance_variable_get("@authenticated") + assert !@controller.instance_variable_defined?("@authenticated") end end @@ -204,6 +205,7 @@ module AbstractController before_filter :first, :only => :index def not_index + @text ||= nil self.response_body = @text.to_s end end -- cgit v1.2.3