diff options
-rw-r--r-- | activesupport/test/core_ext/class_test.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/activesupport/test/core_ext/class_test.rb b/activesupport/test/core_ext/class_test.rb index 08bb13dd35..60ba3b8f88 100644 --- a/activesupport/test/core_ext/class_test.rb +++ b/activesupport/test/core_ext/class_test.rb @@ -1,5 +1,6 @@ require 'abstract_unit' require 'active_support/core_ext/class' +require 'set' class ClassTest < Test::Unit::TestCase class Parent; end @@ -12,16 +13,16 @@ class ClassTest < Test::Unit::TestCase class C < B; end def test_descendants - assert_equal [Foo, Bar, Baz, A, B, C], Parent.descendants - assert_equal [Bar, Baz], Foo.descendants + assert_equal [Foo, Bar, Baz, A, B, C].to_set, Parent.descendants.to_set + assert_equal [Bar, Baz].to_set, Foo.descendants.to_set assert_equal [Baz], Bar.descendants assert_equal [], Baz.descendants end def test_subclasses - assert_equal [Foo, A], Parent.subclasses + assert_equal [Foo, A].to_set, Parent.subclasses.to_set assert_equal [Bar], Foo.subclasses assert_equal [Baz], Bar.subclasses assert_equal [], Baz.subclasses end -end
\ No newline at end of file +end |