Permalink
Browse files

Convert to minitest

  • Loading branch information...
1 parent 0d21f62 commit 936c13de63ad6eb24050809377c63a9e7177c8af drbrain committed Oct 10, 2008
View
@@ -3,12 +3,13 @@
* X Major Enhancements
* Y Minor Enhancements
-** Added a space after the commas in ri class method lists (rubyforge
- enhancement 22182).
+ * Added a space after the commas in ri class method lists (rubyforge
+ enhancement 22182).
+ * Converted to minitest.
* Z Bug Fixes
-** Fix missing superclass in ri output.
-
+ * Fix missing superclass in ri output.
+
=== 2.2.1 / 2008-09-24
This version provides some minor fixes and enhancements to 2.2.0 intended
to polish RDoc for Ruby 1.9.1.
View
@@ -9,6 +9,8 @@ Hoe.new "rdoc", RDoc::VERSION do |rdoc|
rdoc.developer 'Phil Hagelberg', 'technomancy@gmail.com'
rdoc.developer 'Tony Strauss', 'tony.strauss@designingpatterns.com'
rdoc.remote_rdoc_dir = ''
+
+ rdoc.extra_dev_deps << ['minitest', '~> 1.3']
end
# These tasks expect to have the following directory structure:
View
@@ -1,4 +1,5 @@
require 'rdoc/parser'
+require 'rdoc/parser/ruby'
require 'rdoc/known_classes'
##
@@ -1,15 +1,16 @@
-require 'test/unit'
+require 'rubygems'
+require 'minitest/unit'
require 'rdoc/markup/attribute_manager'
-class TestAttributeManager < Test::Unit::TestCase
+class TestAttributeManager < MiniTest::Unit::TestCase
def setup
@am = RDoc::Markup::AttributeManager.new
@klass = RDoc::Markup::AttributeManager
end
-
+
def teardown
- silently do
+ silently do
@klass.const_set(:MATCHING_WORD_PAIRS, {})
@klass.const_set(:WORD_PAIR_MAP, {})
@klass.const_set(:HTML_TAGS, {})
@@ -34,9 +35,9 @@ def test_add_matching_word_pair
assert_equal(4,word_pairs.size)
assert(word_pairs.has_key?("x"))
end
-
+
def test_add_invalid_word_pair
- assert_raise ArgumentError do
+ assert_raises ArgumentError do
@am.add_word_pair("<", "<", :TEST)
end
end
@@ -71,3 +72,5 @@ def silently(&block)
end
end
+
+MiniTest::Unit.autorun
@@ -1,11 +1,12 @@
require 'fileutils'
require 'tmpdir'
-require 'test/unit'
+require 'rubygems'
+require 'minitest/unit'
require 'rdoc/generator/texinfo'
# From chapter 18 of the Pickaxe 3rd ed. and the TexInfo manual.
-class TestRDocInfoFormatting < Test::Unit::TestCase
+class TestRDocInfoFormatting < MiniTest::Unit::TestCase
def setup
@output_dir = File.join Dir.tmpdir, "test_rdoc_info_formatting_#{$$}"
@output_file = File.join @output_dir, 'rdoc.texinfo'
@@ -24,7 +25,8 @@ def teardown
# Make sure tags like *this* do not make HTML
def test_descriptions_are_not_html
- assert_no_match Regexp.new("\<b\>this\<\/b\>"), @text, "We had some HTML; icky!"
+ refute_match Regexp.new("\<b\>this\<\/b\>"), @text,
+ "We had some HTML; icky!"
end
# Ensure we get a reasonable amount
@@ -173,3 +175,5 @@ def assert_match(regex, string = @text,
assert string[regex] #, message
end
end
+
+MiniTest::Unit.autorun
@@ -1,6 +1,7 @@
require 'fileutils'
require 'tempfile'
-require 'test/unit'
+require 'rubygems'
+require 'minitest/unit'
require 'tmpdir'
require 'rdoc/generator/texinfo'
@@ -9,7 +10,7 @@
class RDoc::Generator::TEXINFO; attr_reader :files, :classes; end
class RDoc::RDoc; attr_reader :options; attr_reader :gen; end
-class TestRDocInfoSections < Test::Unit::TestCase
+class TestRDocInfoSections < MiniTest::Unit::TestCase
def setup
@output_dir = File.join Dir.tmpdir, "test_rdoc_info_sections_#{$$}"
@@ -134,3 +135,5 @@ def my_method(my_first_argument) end
DOC
end
+
+MiniTest::Unit.autorun
View
@@ -1,8 +1,9 @@
-require 'test/unit'
+require 'rubygems'
+require 'minitest/unit'
require 'rdoc/markup'
require 'rdoc/markup/to_test'
-class TestRDocMarkup < Test::Unit::TestCase
+class TestRDocMarkup < MiniTest::Unit::TestCase
def basic_conv(str)
sm = RDoc::Markup.new
@@ -611,3 +612,4 @@ def test_whitespace
end
+MiniTest::Unit.autorun
@@ -1,8 +1,9 @@
-require "test/unit"
+require "rubygems"
+require "minitest/unit"
require "rdoc/markup/inline"
require "rdoc/markup/to_html_crossref"
-class TestRDocMarkupAttributeManager < Test::Unit::TestCase
+class TestRDocMarkupAttributeManager < MiniTest::Unit::TestCase
def setup
@orig_special = RDoc::Markup::AttributeManager::SPECIAL
@@ -60,7 +61,7 @@ def test_add_word_pair
end
def test_add_word_pair_angle
- e = assert_raise ArgumentError do
+ e = assert_raises ArgumentError do
@am.add_word_pair '<', '>', 'angles'
end
@@ -229,3 +230,5 @@ def test_special
end
end
+
+MiniTest::Unit.autorun
@@ -1,8 +1,9 @@
-require 'test/unit'
+require 'rubygems'
+require 'minitest/unit'
require 'rdoc/markup'
require 'rdoc/markup/to_html'
-class TestRDocMarkupToHtml < Test::Unit::TestCase
+class TestRDocMarkupToHtml < MiniTest::Unit::TestCase
def setup
@am = RDoc::Markup::AttributeManager.new
@@ -40,3 +41,5 @@ def util_format(text)
end
end
+
+MiniTest::Unit.autorun
@@ -1,10 +1,14 @@
-require 'test/unit'
+require 'rubygems'
+require 'minitest/unit'
require 'rdoc/generator'
+require 'rdoc/stats'
+require 'rdoc/code_objects'
require 'rdoc/markup/to_html_crossref'
+require 'rdoc/parser/ruby'
require 'pathname'
-class TestRDocMarkupToHtmlCrossref < Test::Unit::TestCase
+class TestRDocMarkupToHtmlCrossref < MiniTest::Unit::TestCase
#
# This method parses a source file and returns a Hash mapping
@@ -286,3 +290,5 @@ def test_handle_special_CROSSREF_no_underscore
verify_class_crossref xref, "Ref_Class4", "Ref_Class4::Ref_Class4"
end
end
+
+MiniTest::Unit.autorun
View
@@ -1,6 +1,9 @@
+require 'rubygems'
+require 'minitest/unit'
require 'rdoc/parser'
+require 'rdoc/parser/ruby'
-class TestRDocParser < Test::Unit::TestCase
+class TestRDocParser < MiniTest::Unit::TestCase
def test_can_parse
assert_equal(RDoc::Parser.can_parse(__FILE__), RDoc::Parser::Ruby)
@@ -16,3 +19,5 @@ def test_can_parse
assert_equal(RDoc::Parser.can_parse(binary_file_name), nil)
end
end
+
+MiniTest::Unit.autorun
@@ -1,6 +1,7 @@
require 'stringio'
require 'tempfile'
-require 'test/unit'
+require 'rubygems'
+require 'minitest/unit'
require 'rdoc/options'
require 'rdoc/parser/c'
@@ -10,7 +11,7 @@ class RDoc::Parser::C
public :do_classes, :do_constants
end
-class TestRDocParserC < Test::Unit::TestCase
+class TestRDocParserC < MiniTest::Unit::TestCase
def setup
@tempfile = Tempfile.new self.class.name
@@ -283,3 +284,4 @@ def util_parser(content)
end
+MiniTest::Unit.autorun
@@ -1,10 +1,11 @@
require 'stringio'
require 'tempfile'
-require 'test/unit'
+require 'rubygems'
+require 'minitest/unit'
require 'rdoc/options'
require 'rdoc/parser/perl'
-class TestRdocParserPerlPOD < Test::Unit::TestCase
+class TestRdocParserPerlPOD < MiniTest::Unit::TestCase
def setup
@tempfile = Tempfile.new self.class.name
@@ -70,3 +71,4 @@ def util_parser(content)
end
+MiniTest::Unit.autorun
@@ -1,12 +1,13 @@
require 'stringio'
require 'tempfile'
-require 'test/unit'
+require 'rubygems'
+require 'minitest/unit'
require 'rdoc/options'
require 'rdoc/parser/ruby'
require 'rdoc/stats'
-class TestRDocParserRuby < Test::Unit::TestCase
+class TestRDocParserRuby < MiniTest::Unit::TestCase
def setup
@tempfile = Tempfile.new self.class.name
@@ -747,3 +748,4 @@ def util_toplevel
end
+MiniTest::Unit.autorun
@@ -1,8 +1,9 @@
require 'stringio'
-require 'test/unit'
+require 'rubygems'
+require 'minitest/unit'
require 'rdoc/ri/formatter'
-class TestRDocRIAttributeFormatter < Test::Unit::TestCase
+class TestRDocRIAttributeFormatter < MiniTest::Unit::TestCase
def setup
@output = StringIO.new
@@ -40,3 +41,4 @@ def test_wrap_short
end
+MiniTest::Unit.autorun
@@ -1,10 +1,11 @@
require 'stringio'
-require 'test/unit'
+require 'rubygems'
+require 'minitest/unit'
require 'rdoc/ri/formatter'
require 'rdoc/ri/display'
require 'rdoc/ri/driver'
-class TestRDocRiDefaultDisplay < Test::Unit::TestCase
+class TestRDocRiDefaultDisplay < MiniTest::Unit::TestCase
def setup
@output = StringIO.new
@@ -296,3 +297,5 @@ def h(hash)
end
end
+
+MiniTest::Unit.autorun
@@ -1,8 +1,9 @@
-require 'test/unit'
+require 'rubygems'
+require 'minitest/unit'
require 'tmpdir'
require 'rdoc/ri/driver'
-class TestRDocRIDriver < Test::Unit::TestCase
+class TestRDocRIDriver < MiniTest::Unit::TestCase
def setup
@tmpdir = File.join Dir.tmpdir, "test_rdoc_ri_driver_#{$$}"
@@ -90,3 +91,4 @@ def test_parse_name
end
+MiniTest::Unit.autorun
@@ -1,9 +1,10 @@
require 'stringio'
-require 'test/unit'
+require 'rubygems'
+require 'minitest/unit'
require 'rdoc/ri/formatter'
require 'rdoc/markup/to_flow'
-class TestRDocRIFormatter < Test::Unit::TestCase
+class TestRDocRIFormatter < MiniTest::Unit::TestCase
def setup
@output = StringIO.new
@@ -97,7 +98,7 @@ def test_display_flow_item_rule
end
def test_display_flow_item_unknown
- e = assert_raise RDoc::Error do
+ e = assert_raises RDoc::Error do
@f.display_flow_item Object.new
end
@@ -189,7 +190,7 @@ def test_display_list_unknown
list = RDoc::Markup::Flow::LIST.new :UNKNOWN
list << RDoc::Markup::Flow::LI.new(nil, 'a b c')
- e = assert_raise ArgumentError do
+ e = assert_raises ArgumentError do
@f.display_list list
end
@@ -316,3 +317,4 @@ def test_wrap_short
end
+MiniTest::Unit.autorun
Oops, something went wrong.

0 comments on commit 936c13d

Please sign in to comment.