diff options
Diffstat (limited to 'test/rdoc/test_rdoc_parser.rb')
-rw-r--r-- | test/rdoc/test_rdoc_parser.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/rdoc/test_rdoc_parser.rb b/test/rdoc/test_rdoc_parser.rb index 338693f97a..b9bff9c327 100644 --- a/test/rdoc/test_rdoc_parser.rb +++ b/test/rdoc/test_rdoc_parser.rb @@ -110,6 +110,21 @@ class TestRDocParser < RDoc::TestCase end end + def test_class_for_modeline + temp_dir do + content = "# -*- rdoc -*-\n= NEWS\n" + + open 'NEWS', 'w' do |io| io.write content end + app = @store.add_file 'NEWS' + + parser = @RP.for app, 'NEWS', content, @options, :stats + + assert_kind_of RDoc::Parser::Simple, parser + + assert_equal "= NEWS\n", parser.content + end + end + def test_can_parse_modeline readme_ext = File.join Dir.tmpdir, "README.EXT.#{$$}" |