-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added spec test for generating document header from DocBook 5 content
- Loading branch information
1 parent
fed0079
commit 1b94f09
Showing
1 changed file
with
44 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
require 'spec_helper' | ||
|
||
describe 'Conversion' do | ||
it 'should create a document header with title, author and attributes' do | ||
it 'should create a document header with title, author and attributes from DocBook 4.5 content' do | ||
input = <<-EOS | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<book xmlns="http://docbook.org/ns/docbook"> | ||
|
@@ -23,6 +23,49 @@ | |
|
||
expected = <<-EOS.rstrip | ||
= Document Title | ||
Doc Writer <[email protected]> | ||
:doctype: book | ||
:sectnums: | ||
:toc: left | ||
:icons: font | ||
:experimental: | ||
== First Section | ||
content | ||
EOS | ||
|
||
output = Docbookrx.convert input | ||
|
||
expect(output).to eq(expected) | ||
end | ||
|
||
it 'should create a document header with title, author and attributes from DocBook 5 content' do | ||
input = <<-EOS | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<book xmlns="http://docbook.org/ns/docbook"> | ||
<title>Document Title</title> | ||
<info> | ||
<author> | ||
<personname> | ||
<firstname>Doc</firstname> | ||
<surname>Writer</surname> | ||
</personname> | ||
<email>[email protected]</email> | ||
</author> | ||
</info> | ||
<section> | ||
<title>First Section</title> | ||
<para>content</para> | ||
</section> | ||
</book> | ||
EOS | ||
|
||
expected = <<-EOS.rstrip | ||
= Document Title | ||
Doc Writer <[email protected]> | ||
:doctype: book | ||
:sectnums: | ||
|