summaryrefslogtreecommitdiff
path: root/test/rdoc
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-27 01:25:01 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-27 01:25:01 +0000
commit1ac307dddc22f333e5e1d93110eb4eeb947fc79c (patch)
tree0ce5c5ec0b7180d66b36c3092458139cdead73a2 /test/rdoc
parentf9e7c3c37f022aa88dc19c993e814df03c623239 (diff)
downloadruby-1ac307dddc22f333e5e1d93110eb4eeb947fc79c.tar.gz
* lib/rdoc/parser.rb (RDoc::Parser.binary?): fix for empty files.
[ruby-dev:38848] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24297 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rdoc')
-rw-r--r--test/rdoc/test_rdoc_parser.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/rdoc/test_rdoc_parser.rb b/test/rdoc/test_rdoc_parser.rb
index d6420d20f1..19e859e528 100644
--- a/test/rdoc/test_rdoc_parser.rb
+++ b/test/rdoc/test_rdoc_parser.rb
@@ -1,9 +1,9 @@
require 'rubygems'
-require 'minitest/unit'
+require 'test/unit'
require 'rdoc/parser'
require 'rdoc/parser/ruby'
-class TestRDocParser < MiniTest::Unit::TestCase
+class TestRDocParser < Test::Unit::TestCase
def test_can_parse
assert_equal(RDoc::Parser.can_parse(__FILE__), RDoc::Parser::Ruby)
@@ -16,7 +16,9 @@ class TestRDocParser < MiniTest::Unit::TestCase
assert_equal(RDoc::Parser.can_parse(readme_file_name), RDoc::Parser::Simple)
binary_file_name = File.join(File.dirname(__FILE__), "binary.dat")
- assert_equal(RDoc::Parser.can_parse(binary_file_name), nil)
+ assert_nil(RDoc::Parser.can_parse(binary_file_name))
+ empty_file_name = File.join(File.dirname(__FILE__), "empty.dat")
+ assert_not_nil(RDoc::Parser.can_parse(empty_file_name))
end
end