Permalink
Browse files

Use instance_variable_defined? instead instance_variable_get in tests.

  • Loading branch information...
1 parent 3abd059 commit 80a98e9b258f5b335ee035edc7aa520819532075 @miloops miloops committed Sep 28, 2010
Showing with 2 additions and 2 deletions.
  1. +2 −2 actionpack/test/controller/action_pack_assertions_test.rb
@@ -234,13 +234,13 @@ def test_assert_redirected_to_top_level_named_route_with_same_controller_name_in
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

0 comments on commit 80a98e9

Please sign in to comment.