1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/rdoc*: Updated to RDoc 4.0 (pre-release)

* bin/rdoc:  ditto
* test/rdoc:  ditto
* NEWS:  Updated with RDoc 4.0 information


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37889 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
drbrain 2012-11-27 04:28:14 +00:00
parent c72f0daa87
commit 1c279a7d27
233 changed files with 45019 additions and 5100 deletions

View file

@ -1,9 +1,6 @@
# coding: US-ASCII
require 'rubygems'
require 'minitest/autorun'
require File.expand_path '../xref_test_case', __FILE__
require 'rdoc/code_object'
class TestRDocCodeObject < XrefTestCase
@ -32,6 +29,16 @@ class TestRDocCodeObject < XrefTestCase
assert_equal 'I am a comment', @co.comment
end
def test_comment_equals_comment
@co.comment = comment ''
assert_equal '', @co.comment.text
@co.comment = comment 'I am a comment'
assert_equal 'I am a comment', @co.comment.text
end
def test_comment_equals_document
doc = RDoc::Markup::Document.new
@co.comment = doc
@ -167,7 +174,7 @@ class TestRDocCodeObject < XrefTestCase
def test_file_name
assert_equal nil, @co.file_name
@co.record_location RDoc::TopLevel.new 'lib/file.rb'
@co.record_location @store.add_file 'lib/file.rb'
assert_equal 'lib/file.rb', @co.file_name
end
@ -256,6 +263,26 @@ class TestRDocCodeObject < XrefTestCase
refute @co.ignored?
end
def test_section
parent = RDoc::Context.new
section = parent.sections.first
@co.parent = parent
@co.instance_variable_set :@section, section
assert_equal section, @co.section
@co.instance_variable_set :@section, nil
@co.instance_variable_set :@section_title, nil
assert_equal section, @co.section
@co.instance_variable_set :@section, nil
@co.instance_variable_set :@section_title, 'new title'
assert_equal 'new title', @co.section.title
end
def test_start_doc
@co.document_self = false
@co.document_children = false