Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use instance_variable_defined? instead instance_variable_get in tests.

  • Loading branch information...
commit 80a98e9b258f5b335ee035edc7aa520819532075 1 parent 3abd059
Emilio Tagua miloops authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 actionpack/test/controller/action_pack_assertions_test.rb
4 actionpack/test/controller/action_pack_assertions_test.rb
View
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.