diff options
author | Emilio Tagua <miloops@gmail.com> | 2010-09-28 18:25:52 -0300 |
---|---|---|
committer | Emilio Tagua <miloops@gmail.com> | 2010-09-28 18:25:52 -0300 |
commit | 0c08d8bd758a15b137ba3523c3cde8b371cf725a (patch) | |
tree | 1d2000ed69f0c3e2e2c1cc3cf4ea5f151e97bcfb | |
parent | 0fa9c5392ec24a7d1017d03aa00a2bac32f53158 (diff) | |
download | rails-0c08d8bd758a15b137ba3523c3cde8b371cf725a.tar.gz rails-0c08d8bd758a15b137ba3523c3cde8b371cf725a.tar.bz2 rails-0c08d8bd758a15b137ba3523c3cde8b371cf725a.zip |
Fix more warnings by defining variables and using instance_variable_defined? instead instance_variable_get.
-rw-r--r-- | actionpack/test/abstract/callbacks_test.rb | 6 |
1 files changed, 4 insertions, 2 deletions
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 |