Sha256: d614c4d96ed890998488b26e4191993a041e6c37748d2edaae584a1d757c1284

Contents?: true

Size: 559 Bytes

Versions: 1

Compression:

Stored size: 559 Bytes

Contents

require 'test_helper'

class DocumentTest < Test::Unit::TestCase
  # setup for test
  def setup
    @doc = Asciidoctor::Document.new(File.readlines(sample_doc_path(:asciidoc_index)))
  end

  def test_title
    assert_equal "AsciiDoc Home Page", @doc.title
  end

  def test_with_no_title
    d = Asciidoctor::Document.new("Snorf")
    assert_nil d.title
  end

  def test_is_section_heading
    assert @doc.send(:is_section_heading?, "AsciiDoc Home Page", "==================")
    assert @doc.send(:is_section_heading?, "=== AsciiDoc Home Page")
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
asciidoctor-0.0.1 test/document_test.rb