home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ruby164.zip / rbemx164.zip / ruby / share / doc / rdtool-0.6.10 / test / test-rdtree.rb < prev    next >
Text File  |  2001-04-17  |  502b  |  23 lines

  1. require 'runit/testcase'
  2. require 'runit/cui/testrunner'
  3.  
  4. require 'rd/rdfmt'
  5. require 'rd/element'
  6.  
  7. include RD
  8.  
  9. class TestRDTree < RUNIT::TestCase
  10.   def test_s_new
  11.     tr = RDTree.new("=begin\nTEST\n=end\n")
  12.     assert_kind_of(DocumentElement, tr.root)
  13.  
  14.     tr_not_parse = RDTree.new("=begin\nTEST\n=end\n", ["test/data"], false)
  15.     assert_nil(tr_not_parse.root)
  16.     assert_equal(["test/data"], tr_not_parse.include_paths)
  17.   end
  18. end
  19.  
  20. if $0 == __FILE__
  21.   RUNIT::CUI::TestRunner.run(TestRDTree.suite)
  22. end
  23.