diff options
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/core_ext/object_and_class_ext_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/activesupport/test/core_ext/object_and_class_ext_test.rb b/activesupport/test/core_ext/object_and_class_ext_test.rb index f7e2cc4056..5e6144d64c 100644 --- a/activesupport/test/core_ext/object_and_class_ext_test.rb +++ b/activesupport/test/core_ext/object_and_class_ext_test.rb @@ -177,6 +177,13 @@ class ObjectInstanceVariableTest < Test::Unit::TestCase @source.instance_variable_set(:@baz, 'baz') end + def test_instance_variable_defined + assert @source.instance_variable_defined?('@bar') + assert @source.instance_variable_defined?(:@bar) + assert !@source.instance_variable_defined?(:@foo) + assert !@source.instance_variable_defined?('@foo') + end + def test_copy_instance_variables_from_without_explicit_excludes assert_equal [], @dest.instance_variables @dest.copy_instance_variables_from(@source) |