aboutsummaryrefslogtreecommitdiffstats
path: root/test/rdoc/test_rdoc_info_formatting.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-07-21 18:35:14 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-07-21 18:35:14 +0000
commitcd9e9c6debcf893ea5fa70e42dc1875afaf0066f (patch)
tree5921615c87529d73ed017b58ee1ce57ef6861cfc /test/rdoc/test_rdoc_info_formatting.rb
parentc62db0676bbb8051dac4f462240962e044db6cd4 (diff)
downloadruby-cd9e9c6debcf893ea5fa70e42dc1875afaf0066f.tar.gz
Update to RDoc 2.1.0 r112
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18147 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rdoc/test_rdoc_info_formatting.rb')
-rw-r--r--test/rdoc/test_rdoc_info_formatting.rb22
1 files changed, 9 insertions, 13 deletions
diff --git a/test/rdoc/test_rdoc_info_formatting.rb b/test/rdoc/test_rdoc_info_formatting.rb
index bcc55ddf59..6c024f7454 100644
--- a/test/rdoc/test_rdoc_info_formatting.rb
+++ b/test/rdoc/test_rdoc_info_formatting.rb
@@ -1,29 +1,25 @@
-$LOAD_PATH.unshift File.dirname(__FILE__) + '/../lib/'
require 'fileutils'
+require 'tmpdir'
require 'test/unit'
+
require 'rdoc/generator/texinfo'
-require 'yaml'
# From chapter 18 of the Pickaxe 3rd ed. and the TexInfo manual.
class TestRdocInfoFormatting < Test::Unit::TestCase
- OUTPUT_DIR = "/tmp/rdoc-#{$$}"
-
def setup
- # supress stdout
- $stdout = File.new('/dev/null','w')
- $stderr = File.new('/dev/null','w')
+ @output_dir = File.join Dir.tmpdir, "test_rdoc_info_formatting_#{$$}"
+ @output_file = File.join @output_dir, 'rdoc.texinfo'
- RDoc::RDoc.new.document(['--fmt=texinfo',
+ RDoc::RDoc.new.document(['--fmt=texinfo', '--quiet',
File.expand_path(__FILE__),
- "--op=#{OUTPUT_DIR}"])
- @text = File.read(OUTPUT_DIR + '/rdoc.texinfo')
+ "--op=#{@output_dir}"])
+ @text = File.read @output_file
+
# File.open('rdoc.texinfo', 'w') { |f| f.puts @text }
end
def teardown
- $stdout = STDOUT
- $stderr = STDERR
- FileUtils.rm_rf OUTPUT_DIR
+ FileUtils.rm_rf @output_dir
end
# Make sure tags like *this* do not make HTML