/vendor/gems/facets-2.4.5/test/core/class/test_descendents.rb

https://bitbucket.org/mediashelf/fedora-migrator · Ruby · 14 lines · 10 code · 4 blank · 0 comment · 0 complexity · d9a363994c288f5544d57886dbfd0849 MD5 · raw file

  1. require 'facets/class/descendents.rb'
  2. require 'test/unit'
  3. class TestClassDescendents < Test::Unit::TestCase
  4. class A ; end
  5. class B < A ; end
  6. class C < B ; end
  7. def test_descendents
  8. assert_equal( [C,B], A.descendents )
  9. end
  10. end