From 74c48a345f37eed41583479f9fff7e338fc1d4ca Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Thu, 23 Nov 2023 10:48:08 +0800 Subject: [PATCH] Add spec tests for HTML5-modified converter --- spec/html5_extended_converter.rb | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 spec/html5_extended_converter.rb diff --git a/spec/html5_extended_converter.rb b/spec/html5_extended_converter.rb new file mode 100644 index 0000000..31ebcaa --- /dev/null +++ b/spec/html5_extended_converter.rb @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +require 'asciidoctor/foodogsquared/converters/html5-extended' + +describe Asciidoctor::Foodogsquared::Converters::HTML5Modified do + it 'should have a more semantic paragraph output' do + input = <<~INPUT + Hello there, fanciful! + INPUT + + expected = <<~HTML +

Hello there, fanciful!

+ HTML + + actual = (Asciidoctor.convert input).chomp + (expect actual).to eq expected.chomp + end + + it 'should still have a more semantic paragraph output with a title' do + input = <<~INPUT + .Whoa there! + Hello there, fanciful! + INPUT + + expected = <<~HTML +

Whoa there!Hello there, fanciful!

+ HTML + + actual = (Asciidoctor.convert input).chomp + (expect actual).to eq expected.chomp + end +end