mirror of
https://github.com/foo-dogsquared/asciidoctor-foodogsquared-extensions.git
synced 2025-01-31 04:58:07 +00:00
Add spec tests for HTML5-modified converter
This commit is contained in:
parent
a6283b72a1
commit
74c48a345f
32
spec/html5_extended_converter.rb
Normal file
32
spec/html5_extended_converter.rb
Normal file
@ -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
|
||||||
|
<p>Hello there, fanciful!</p>
|
||||||
|
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
|
||||||
|
<p><strong class="title">Whoa there!</strong>Hello there, fanciful!</p>
|
||||||
|
HTML
|
||||||
|
|
||||||
|
actual = (Asciidoctor.convert input).chomp
|
||||||
|
(expect actual).to eq expected.chomp
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in New Issue
Block a user