summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorDan Allen <dan.j.allen@gmail.com>2022-10-28 21:01:14 -0600
committerDan Allen <dan.j.allen@gmail.com>2022-10-28 21:05:38 -0600
commit215ef659ca767b2f752568a21c53f8fd34a8d90d (patch)
tree88afa934bd19dd4dc93d0b6d29314ac3780975a3 /spec
parent1c560b8f0a7c2734b329c5f01d2928a704e3be3a (diff)
upgrade RuboCop, configure new rules, and update code to conform
Diffstat (limited to 'spec')
-rw-r--r--spec/admonition_spec.rb4
-rw-r--r--spec/arrange_block_spec.rb2
-rw-r--r--spec/image_spec.rb4
-rw-r--r--spec/page_spec.rb2
-rw-r--r--spec/video_spec.rb4
5 files changed, 8 insertions, 8 deletions
diff --git a/spec/admonition_spec.rb b/spec/admonition_spec.rb
index 07df2a6c..2506de26 100644
--- a/spec/admonition_spec.rb
+++ b/spec/admonition_spec.rb
@@ -98,7 +98,7 @@ describe 'Asciidoctor::PDF::Converter - Admonition' do
(expect lines[1][:to][:y]).to be > 36.0
end
- it 'should draw border and background on all pages if block is split across pages', visual: true, breakable: true do
+ it 'should draw border and background on all pages if block is split across pages', breakable: true, visual: true do
pdf_theme = {
admonition_background_color: 'F5A9A9',
admonition_border_width: 0.5,
@@ -763,7 +763,7 @@ describe 'Asciidoctor::PDF::Converter - Admonition' do
end).to log_message severity: :WARN, message: %(~could not embed admonition icon image: #{fixture_file 'corrupt.png'}; image file is an unrecognised format)
end
- it 'should embed remote image in icon if allow-uri-read attribute is set', visual: true, network: true do
+ it 'should embed remote image in icon if allow-uri-read attribute is set', network: true, visual: true do
with_svg_with_remote_image do |image_path|
to_file = to_pdf_file <<~EOS, 'admonition-custom-svg-icon-with-remote-image.pdf', attribute_overrides: { 'docdir' => tmp_dir, 'allow-uri-read' => '' }
:icons: font
diff --git a/spec/arrange_block_spec.rb b/spec/arrange_block_spec.rb
index 4167b5e9..97d57e05 100644
--- a/spec/arrange_block_spec.rb
+++ b/spec/arrange_block_spec.rb
@@ -2051,7 +2051,7 @@ describe 'Asciidoctor::PDF::Converter#arrange_block' do
end
# NOTE: generate reference files using ./scripts/generate-arrange-block-reference-files.sh
- describe 'acceptance', visual: true, if: ENV['COVERAGE'] do
+ describe 'acceptance', if: ENV['COVERAGE'], visual: true do
it 'at top, fits' do
to_file = to_pdf_file (Pathname.new (fixture_file 'arrange-block-at-top-fits.adoc')),
'arrange-block-at-top-fits.pdf', attribute_overrides: { 'source-highlighter' => 'rouge' }
diff --git a/spec/image_spec.rb b/spec/image_spec.rb
index 8bc711a9..2bafa64a 100644
--- a/spec/image_spec.rb
+++ b/spec/image_spec.rb
@@ -1047,7 +1047,7 @@ describe 'Asciidoctor::PDF::Converter - Image' do
end
end
- it 'should embed remote image if allow allow-uri-read attribute is set', visual: true, network: true do
+ it 'should embed remote image if allow allow-uri-read attribute is set', network: true, visual: true do
with_svg_with_remote_image do |image_path|
to_file = to_pdf_file <<~EOS, 'image-svg-with-remote-image.pdf', attribute_overrides: { 'allow-uri-read' => '' }
A sign of a good writer: image:#{image_path}[pdfwidth=1.27cm]
@@ -1336,7 +1336,7 @@ describe 'Asciidoctor::PDF::Converter - Image' do
end
# NOTE: gmagick reads `Depth: 8/2-bit` as 2 instead of 8
- it 'should reread bit depth if gmagick fails to read bit depth correctly', visual: true, if: (defined? GMagick::Image) do
+ it 'should reread bit depth if gmagick fails to read bit depth correctly', if: (defined? GMagick::Image), visual: true do
to_file = to_pdf_file <<~'EOS', 'image-png-depth.pdf'
image::square.png[pdfwidth=25%]
EOS
diff --git a/spec/page_spec.rb b/spec/page_spec.rb
index d718a4b8..dc1c4d91 100644
--- a/spec/page_spec.rb
+++ b/spec/page_spec.rb
@@ -1418,7 +1418,7 @@ describe 'Asciidoctor::PDF::Converter - Page' do
(expect to_file).to visually_match 'page-background-image-fill.pdf'
end
- it 'should allow remote image in SVG to be read if allow-uri-read attribute is set', visual: true, network: true do
+ it 'should allow remote image in SVG to be read if allow-uri-read attribute is set', network: true, visual: true do
with_svg_with_remote_image do |image_path|
to_file = to_pdf_file <<~EOS, 'page-background-image-svg-with-remote-image.pdf', attribute_overrides: { 'allow-uri-read' => '' }
:page-background-image: image:#{image_path}[fit=none,position=top]
diff --git a/spec/video_spec.rb b/spec/video_spec.rb
index 8450e52c..9daca159 100644
--- a/spec/video_spec.rb
+++ b/spec/video_spec.rb
@@ -45,7 +45,7 @@ describe 'Asciidoctor::PDF::Converter - Video' do
end
context 'YouTube' do
- it 'should replace video with poster image if allow-uri-read attribute is set', visual: true, network: true do
+ it 'should replace video with poster image if allow-uri-read attribute is set', network: true, visual: true do
video_id = 'EJ09pSuA9hw'
to_file = to_pdf_file <<~EOS, 'video-youtube-poster.pdf', attribute_overrides: { 'allow-uri-read' => '' }
video::#{video_id}[youtube,pdfwidth=100%]
@@ -79,7 +79,7 @@ describe 'Asciidoctor::PDF::Converter - Video' do
end
context 'Vimeo' do
- it 'should replace video with poster image if allow-uri-read attribute is set', visual: true, network: true do
+ it 'should replace video with poster image if allow-uri-read attribute is set', network: true, visual: true do
video_id = '77477140'
to_file = to_pdf_file <<~EOS, 'video-vimeo-poster.pdf', attribute_overrides: { 'allow-uri-read' => '' }
video::#{video_id}[vimeo,pdfwidth=100%]