summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-11-05 09:18:10 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-11-05 09:18:10 +0000
commitcdc527db342eda4c58b62c5dc2a14441a395df5d (patch)
tree237c953b345a00333d1600706a7f2484b4ad408c /test
parent0a0eb2807ed745e1cdf7f4698fe805b4aaaee2c6 (diff)
* lib/rdoc/*, test/rdoc/*: Update rdoc-5.0.0
Release note: https://github.com/rdoc/rdoc/blob/b825775647f62c5b525e9780a28ff2fbb1d5bf6f/History.rdoc#500--2016-11-05 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/rdoc/test_rdoc_context.rb14
-rw-r--r--test/rdoc/test_rdoc_markup_to_html_snippet.rb3
-rw-r--r--test/rdoc/test_rdoc_parser.rb2
-rw-r--r--test/rdoc/test_rdoc_rd_block_parser.rb2
-rw-r--r--test/rdoc/test_rdoc_rdoc.rb8
-rw-r--r--test/rdoc/test_rdoc_rubygems_hook.rb4
-rw-r--r--test/rdoc/test_rdoc_store.rb6
7 files changed, 13 insertions, 26 deletions
diff --git a/test/rdoc/test_rdoc_context.rb b/test/rdoc/test_rdoc_context.rb
index 7b700bc234..cc9ab3650f 100644
--- a/test/rdoc/test_rdoc_context.rb
+++ b/test/rdoc/test_rdoc_context.rb
@@ -8,9 +8,6 @@ class TestRDocContext < XrefTestCase
@context = RDoc::Context.new
@context.store = @store
-
- @enumerator = # 1.8 vs 1.9
- Object.const_defined?(:Enumerator) ? Enumerator : Enumerable::Enumerator
end
def test_initialize
@@ -118,8 +115,6 @@ class TestRDocContext < XrefTestCase
end
def test_add_class_basic_object
- skip 'BasicObject is 1.9 only' unless defined?(BasicObject)
-
@xref_data.add_class RDoc::NormalClass, 'BasicObject'
basic = @xref_data.find_module_named 'BasicObject'
@@ -134,13 +129,11 @@ class TestRDocContext < XrefTestCase
end
def test_add_class_object
- root_class = defined?(BasicObject) ? 'BasicObject' : nil
-
@xref_data.add_class RDoc::NormalClass, 'Object'
object = @xref_data.find_module_named 'Object'
- assert_equal root_class, object.superclass
+ assert_equal 'BasicObject', object.superclass
@c1.add_class RDoc::NormalClass, 'Object'
@@ -457,7 +450,7 @@ class TestRDocContext < XrefTestCase
end
def test_each_method_enumerator
- assert_kind_of @enumerator, @c1.each_method
+ assert_kind_of Enumerator, @c1.each_method
end
def test_each_section
@@ -489,7 +482,7 @@ class TestRDocContext < XrefTestCase
end
def test_each_section_enumerator
- assert_kind_of @enumerator, @c1.each_section
+ assert_kind_of Enumerator, @c1.each_section
end
def test_find_attribute_named
@@ -899,4 +892,3 @@ class TestRDocContext < XrefTestCase
end
end
-
diff --git a/test/rdoc/test_rdoc_markup_to_html_snippet.rb b/test/rdoc/test_rdoc_markup_to_html_snippet.rb
index 11bcd526be..d180f551c9 100644
--- a/test/rdoc/test_rdoc_markup_to_html_snippet.rb
+++ b/test/rdoc/test_rdoc_markup_to_html_snippet.rb
@@ -495,7 +495,7 @@ be guessed, raises an error if +name+ couldn't be guessed.
= \RDoc - Ruby Documentation System
* {RDoc Project Page}[https://github.com/rdoc/rdoc/]
-* {RDoc Documentation}[http://docs.seattlerb.org/rdoc]
+* {RDoc Documentation}[https://rdoc.github.io/rdoc]
* {RDoc Bug Tracker}[https://github.com/rdoc/rdoc/issues]
== DESCRIPTION:
@@ -709,4 +709,3 @@ This routine modifies its +comment+ parameter.
end
end
-
diff --git a/test/rdoc/test_rdoc_parser.rb b/test/rdoc/test_rdoc_parser.rb
index 732beb6629..b71d89b064 100644
--- a/test/rdoc/test_rdoc_parser.rb
+++ b/test/rdoc/test_rdoc_parser.rb
@@ -119,7 +119,7 @@ class TestRDocParser < RDoc::TestCase
end
io
end
- tf.close! if tf.respond_to? :close!
+ tf.close!
end
def test_class_for_modeline
diff --git a/test/rdoc/test_rdoc_rd_block_parser.rb b/test/rdoc/test_rdoc_rd_block_parser.rb
index 7afa9a03dd..18ec30db0f 100644
--- a/test/rdoc/test_rdoc_rd_block_parser.rb
+++ b/test/rdoc/test_rdoc_rd_block_parser.rb
@@ -165,7 +165,7 @@ class TestRDocRdBlockParser < RDoc::TestCase
assert_equal expected, parse(str)
io
end
- tf.close! if tf.respond_to? :close!
+ tf.close!
end
def test_parse_heading
diff --git a/test/rdoc/test_rdoc_rdoc.rb b/test/rdoc/test_rdoc_rdoc.rb
index 55096d394e..39f54555b5 100644
--- a/test/rdoc/test_rdoc_rdoc.rb
+++ b/test/rdoc/test_rdoc_rdoc.rb
@@ -133,7 +133,7 @@ class TestRDocRDoc < RDoc::TestCase
end
def test_normalized_file_list_non_file_directory
- dev = defined?(File::NULL) ? File::NULL : '/dev/stdin'
+ dev = File::NULL
skip "#{dev} is not a character special" unless
File.chardev? dev
@@ -261,7 +261,7 @@ class TestRDocRDoc < RDoc::TestCase
assert_equal Encoding::ISO_8859_1, top_level.absolute_name.encoding
io
end
- tf.close! if tf.respond_to? :close!
+ tf.close!
end
def test_parse_file_forbidden
@@ -290,7 +290,7 @@ class TestRDocRDoc < RDoc::TestCase
end
io
end
- tf.close! if tf.respond_to? :close!
+ tf.close!
end
def test_remove_unparseable
@@ -398,7 +398,7 @@ class TestRDocRDoc < RDoc::TestCase
e.message)
tempfile
end
- tf.close! if tf.respond_to? :close!
+ tf.close!
end
def test_setup_output_dir_exists_not_rdoc
diff --git a/test/rdoc/test_rdoc_rubygems_hook.rb b/test/rdoc/test_rdoc_rubygems_hook.rb
index 143d45ec66..ee16f3d95c 100644
--- a/test/rdoc/test_rdoc_rubygems_hook.rb
+++ b/test/rdoc/test_rdoc_rubygems_hook.rb
@@ -7,9 +7,6 @@ class TestRDocRubygemsHook < Gem::TestCase
def setup
super
- skip 'requires RubyGems 1.9+' unless
- Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.9')
-
@a = util_spec 'a', 2 do |s|
s.rdoc_options = %w[--main MyTitle]
s.extra_rdoc_files = %w[README]
@@ -134,7 +131,6 @@ class TestRDocRubygemsHook < Gem::TestCase
end
def test_generate_default_gem
- skip 'RubyGems 2 required' unless @a.respond_to? :default_gem?
@a.loaded_from =
File.join Gem::Specification.default_specifications_dir, 'a.gemspec'
diff --git a/test/rdoc/test_rdoc_store.rb b/test/rdoc/test_rdoc_store.rb
index 2c988aaea4..4082df71ea 100644
--- a/test/rdoc/test_rdoc_store.rb
+++ b/test/rdoc/test_rdoc_store.rb
@@ -3,7 +3,7 @@ require File.expand_path '../xref_test_case', __FILE__
class TestRDocStore < XrefTestCase
- OBJECT_ANCESTORS = defined?(::BasicObject) ? %w[BasicObject] : []
+ OBJECT_ANCESTORS = %w[BasicObject]
def setup
super
@@ -631,7 +631,7 @@ class TestRDocStore < XrefTestCase
:title => nil,
}
- expected[:ancestors]['Object'] = %w[BasicObject] if defined?(::BasicObject)
+ expected[:ancestors]['Object'] = %w[BasicObject]
open File.join(@tmpdir, 'cache.ri'), 'rb' do |io|
cache = Marshal.load io.read
@@ -699,7 +699,7 @@ class TestRDocStore < XrefTestCase
:title => 'title',
}
- expected[:ancestors]['Object'] = %w[BasicObject] if defined?(::BasicObject)
+ expected[:ancestors]['Object'] = %w[BasicObject]
open File.join(@tmpdir, 'cache.ri'), 'rb' do |io|
cache = Marshal.load io.read