Permalink
Browse files

Fix more warnings by defining variables and using instance_variable_d…

…efined? instead instance_variable_get.
  • Loading branch information...
1 parent 0fa9c53 commit 0c08d8bd758a15b137ba3523c3cde8b371cf725a @miloops miloops committed Sep 28, 2010
Showing with 4 additions and 2 deletions.
  1. +4 −2 actionpack/test/abstract/callbacks_test.rb
@@ -47,6 +47,7 @@ def aroundz
end
def index
+ @text ||= nil
self.response_body = @text.to_s
end
end
@@ -152,7 +153,7 @@ def setup
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,14 +197,15 @@ def setup
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
class ChangedConditions < Callback2
before_filter :first, :only => :index
def not_index
+ @text ||= nil
self.response_body = @text.to_s
end
end

0 comments on commit 0c08d8b

Please sign in to comment.