aboutsummaryrefslogtreecommitdiffstats
path: root/test/rdoc
diff options
context:
space:
mode:
Diffstat (limited to 'test/rdoc')
-rw-r--r--test/rdoc/test_rdoc_markup_pre_process.rb14
1 files changed, 13 insertions, 1 deletions
diff --git a/test/rdoc/test_rdoc_markup_pre_process.rb b/test/rdoc/test_rdoc_markup_pre_process.rb
index 3a991a6397..82ab71ee14 100644
--- a/test/rdoc/test_rdoc_markup_pre_process.rb
+++ b/test/rdoc/test_rdoc_markup_pre_process.rb
@@ -11,7 +11,7 @@ class TestRDocMarkupPreProcess < RDoc::TestCase
@file_name = File.basename @tempfile.path
@dir = File.dirname @tempfile.path
- @pp = RDoc::Markup::PreProcess.new __FILE__, [@dir]
+ @pp = RDoc::Markup::PreProcess.new @tempfile.path, [@dir, File.dirname(__FILE__)]
end
def teardown
@@ -72,6 +72,18 @@ contents of a string.
assert_equal expected, content
end
+ def test_include_file_in_other_directory
+ content = nil
+ out, err = capture_io do
+ content = @pp.include_file "test.txt", '', nil
+ end
+
+ assert_empty out
+ assert_empty err
+
+ assert_equal "test file\n", content
+ end
+
def test_handle
text = "# :main: M\n"
out = @pp.handle text