Sha256: 7366a95ecfabba4b02a49f30bfa8c7e6ee2499bd484301c2a78ea92d0f2f4c79

Contents?: true

Size: 650 Bytes

Versions: 2

Compression:

Stored size: 650 Bytes

Contents

require 'rubygems'
require 'test/unit'
require 'shoulda'
require 'nokogiri'

$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
$LOAD_PATH.unshift(File.dirname(__FILE__))
require 'org-parse'

class Test::Unit::TestCase
  @@data_dir = File.join(File.dirname(__FILE__), 'data')
  
  def load_data(fname)
    f = File.open(File.join(@@data_dir,fname))
    str = f.read
    f.close
    str
  end

  def do_parse(str, title)
    @parser = OrgParse::StructParser.new(str, title)
    @parser.parse
  end

  def to_html(str, title)
    @root = do_parse str, title
    @visitor = OrgParse::HtmlVisitor.new(@root)
    @visitor.build
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
org-parse-0.1.2 test/helper.rb
org-parse-0.1.1 test/helper.rb