diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-05-15 23:00:21 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-05-15 23:00:21 +0000 |
commit | f4b52722aad5a8d2e9fc858d2f1c4147ab584d21 (patch) | |
tree | 6a9328c2147f991364e2e1d99abdad5c47da736f /test/rdoc | |
parent | 366f2c1120653be5e08f1cc7452d3dbbe1b85f2b (diff) | |
download | ruby-f4b52722aad5a8d2e9fc858d2f1c4147ab584d21.tar.gz |
* lib/rdoc.rb: Update to RDoc 3.6.1, allows OpenSSL::Digest to be
found.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rdoc')
-rw-r--r-- | test/rdoc/test_rdoc_parser_c.rb | 36 |
1 files changed, 26 insertions, 10 deletions
diff --git a/test/rdoc/test_rdoc_parser_c.rb b/test/rdoc/test_rdoc_parser_c.rb index 9649933fd0..45d0b1e341 100644 --- a/test/rdoc/test_rdoc_parser_c.rb +++ b/test/rdoc/test_rdoc_parser_c.rb @@ -236,27 +236,43 @@ VALUE cFoo = rb_define_class("Foo", rb_cObject); assert_equal "this is the Foo class", klass.comment end - def test_do_classes_singleton + def test_do_classes_class_under content = <<-EOF -VALUE cFoo = rb_define_class("Foo", rb_cObject); -VALUE cFooS = rb_singleton_class(cFoo); +/* Document-class: Kernel::Foo + * this is the Foo class under Kernel + */ +VALUE cFoo = rb_define_class_under(rb_mKernel, "Foo", rb_cObject); EOF - util_get_class content, 'cFooS' - - assert_equal 'Foo', @parser.singleton_classes['cFooS'] + klass = util_get_class content, 'cFoo' + assert_equal 'Kernel::Foo', klass.full_name + assert_equal "this is the Foo class under Kernel", klass.comment end - def test_do_classes_class_under + def test_do_classes_class_under_rb_path2class content = <<-EOF /* Document-class: Kernel::Foo - * this is the Foo class under Kernel + * this is Kernel::Foo < A::B */ -VALUE cFoo = rb_define_class_under(rb_mKernel, "Foo", rb_cObject); +VALUE cFoo = rb_define_class_under(rb_mKernel, "Foo", rb_path2class("A::B")); EOF klass = util_get_class content, 'cFoo' - assert_equal "this is the Foo class under Kernel", klass.comment + + assert_equal 'Kernel::Foo', klass.full_name + assert_equal 'A::B', klass.superclass + assert_equal 'this is Kernel::Foo < A::B', klass.comment + end + + def test_do_classes_singleton + content = <<-EOF +VALUE cFoo = rb_define_class("Foo", rb_cObject); +VALUE cFooS = rb_singleton_class(cFoo); + EOF + + util_get_class content, 'cFooS' + + assert_equal 'Foo', @parser.singleton_classes['cFooS'] end def test_do_classes_module |