Skip to content

Commit

Permalink
add fallback for grayscale assertion for gs 9
Browse files Browse the repository at this point in the history
  • Loading branch information
mojavelinux committed Jan 8, 2025
1 parent 5df296e commit 39ecade
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion spec/optimizer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,11 @@
%w(gray grayscale).each do |mode|
input_file = Pathname.new fixture_file 'with-color.adoc'
to_file = to_pdf_file input_file, 'optimizer-gray.pdf', attribute_overrides: { 'optimize' => %(screen:#{mode}) }
(expect to_file).to visually_match 'optimizer-gray.pdf'
begin
(expect to_file).to visually_match 'optimizer-gray.pdf'
rescue RSpec::Expectations::ExpectationNotMetError
(expect to_file).to visually_match 'optimizer-gray-gs-9.pdf'
end
end
end

Expand Down
Binary file added spec/reference/optimizer-gray-gs-9.pdf
Binary file not shown.
Binary file modified spec/reference/optimizer-gray.pdf
Binary file not shown.

0 comments on commit 39ecade

Please sign in to comment.