From 873b12eb66bb9b36b2dffa751ec87c7b4dca21d4 Mon Sep 17 00:00:00 2001 From: Fintan Bolton Date: Wed, 4 Jan 2017 17:08:59 +0100 Subject: [PATCH] added spec test for generating document header from DocBook 5 content --- spec/lib/docbookrx/docbookrx_spec.rb | 44 +++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) 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: