diff --git a/spec/lib/docbookrx/docbookrx_spec.rb b/spec/lib/docbookrx/docbookrx_spec.rb index f5c4b90..154be62 100644 --- a/spec/lib/docbookrx/docbookrx_spec.rb +++ b/spec/lib/docbookrx/docbookrx_spec.rb @@ -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 @@ -23,6 +23,48 @@ expected = <<-EOS.rstrip = Document Title + +Doc Writer +: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 + + +Document Title + + + +Doc +Writer + +doc@example.com + + +
+First Section +content +
+
+ EOS + + expected = <<-EOS.rstrip += Document Title + Doc Writer :doctype: book :sectnums: