Skip to content

Commit

Permalink
resolves asciidoctor#2444 decouple tests from path of PWD
Browse files Browse the repository at this point in the history
  • Loading branch information
mojavelinux committed Sep 3, 2023
1 parent ae2480d commit d374689
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ Bug Fixes::
* don't crash if page background image value is empty (interpret as "none")
* prevent special character substitution from interfering with callouts in plain verbatim block (#2390)
* remove deprecated, undocumented `svg-font-family` theme key (the correct key is `svg-fallback-font-family`)
* decouple tests from path of PWD (#2444)

== 2.3.9 (2023-06-28) - @mojavelinux

Expand Down
8 changes: 4 additions & 4 deletions spec/audio_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
it 'should replace audio block with right pointer, path to audio file, and audio label' do
expected_lines = [
'before',
%(\u25ba\u00a0#{fixture_file 'podcast.mp3'} (audio)),
%(\u25ba\u00a0path/to/images/podcast.mp3 (audio)),
'after',
]

pdf = to_pdf <<~'END', analyze: true
pdf = to_pdf <<~'END', attributes: { 'imagesdir' => 'path/to/images' }, analyze: true
before
audio::podcast.mp3[]
Expand Down Expand Up @@ -46,13 +46,13 @@
end

it 'should show caption for audio if title is specified' do
pdf = to_pdf <<~'END', analyze: true
pdf = to_pdf <<~'END', attributes: { 'imagesdir' => '' }, analyze: true
:icons: font
.Episode 1 of my podcast
audio::podcast-e1.mp3[]
END

(expect pdf.lines).to eql [%(\uf04b\u00a0#{fixture_file 'podcast-e1.mp3'} (audio)), 'Episode 1 of my podcast']
(expect pdf.lines).to eql [%(\uf04b\u00a0podcast-e1.mp3 (audio)), 'Episode 1 of my podcast']
end
end
8 changes: 4 additions & 4 deletions spec/video_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
end

it 'should replace video with video path and play icon if poster not specified' do
pdf = to_pdf <<~'END', analyze: true
pdf = to_pdf <<~'END', attributes: { 'imagesdir' => 'path/to/images' }, analyze: true
:icons: font
video::asciidoctor.mp4[]
END

(expect pdf.lines).to eql [%(\uf04b\u00a0#{fixture_file 'asciidoctor.mp4'} (video))]
(expect pdf.lines).to eql [%(\uf04b\u00a0path/to/images/asciidoctor.mp4 (video))]
end

it 'should wrap text for video if it exceeds width of content area' do
Expand All @@ -33,14 +33,14 @@
end

it 'should show caption for video with no poster if title is specified' do
pdf = to_pdf <<~'END', analyze: true
pdf = to_pdf <<~'END', attributes: { 'imagesdir' => '' }, analyze: true
:icons: font
.Asciidoctor training
video::asciidoctor.mp4[]
END

(expect pdf.lines).to eql [%(\uf04b\u00a0#{fixture_file 'asciidoctor.mp4'} (video)), 'Asciidoctor training']
(expect pdf.lines).to eql [%(\uf04b\u00a0asciidoctor.mp4 (video)), 'Asciidoctor training']
end
end

Expand Down

0 comments on commit d374689

Please sign in to comment.