mirror of
https://github.com/foo-dogsquared/asciidoctor-foodogsquared-extensions.git
synced 2025-01-30 22:57:56 +00:00
Gabriel Arazas
de9f3a0e9c
Also restructured how they're named in the filesystem and the class names as well.
26 lines
793 B
Ruby
26 lines
793 B
Ruby
# frozen_string_literal: true
|
|
|
|
describe RepologyInlineMacro do
|
|
it 'should link to the Repology page for beets' do
|
|
input = 'repology:beets[]'
|
|
|
|
expected = <<~RESULT
|
|
<a href="https://repology.org/project/beets">beets</a>
|
|
RESULT
|
|
|
|
actual = (Asciidoctor.convert input).tr_s '\n', '\n'
|
|
(expect actual).to include expected.chomp
|
|
end
|
|
|
|
it 'should link to the Repology page for beets with replaced caption' do
|
|
input = 'repology:beets[beets is widely available in a lot of the system distributions]'
|
|
|
|
expected = <<~RESULT
|
|
<a href="https://repology.org/project/beets">beets is widely available in a lot of the system distributions</a>
|
|
RESULT
|
|
|
|
actual = (Asciidoctor.convert input).tr_s '\n', '\n'
|
|
(expect actual).to include expected.chomp
|
|
end
|
|
end
|