summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Allen <dan.j.allen@gmail.com>2019-12-18 23:51:55 -0700
committerDan Allen <dan.j.allen@gmail.com>2019-12-19 13:46:11 -0700
commit3fd8a23b038e2f42b4dd6b879f76cc0ede2fbb90 (patch)
treec09777031cc7c79191be0c9b5a69ee3be1a3cbf9
parent1709800a26338438b85f5b3c31f2ab3418e47eae (diff)
add missing visual tag on open block tests
-rw-r--r--spec/open_spec.rb4
-rw-r--r--spec/spec_helper.rb2
2 files changed, 3 insertions, 3 deletions
diff --git a/spec/open_spec.rb b/spec/open_spec.rb
index de396056..73e4e8f5 100644
--- a/spec/open_spec.rb
+++ b/spec/open_spec.rb
@@ -3,7 +3,7 @@
require_relative 'spec_helper'
describe 'Asciidoctor::PDF::Converter - Open' do
- it 'should keep block together when it has the unbreakable option' do
+ it 'should keep block together when it has the unbreakable option', visual: true do
to_file = to_pdf_file <<~EOS, 'open-unbreakable-option-fit.pdf'
Make it rain.footnote:[money]
@@ -28,7 +28,7 @@ describe 'Asciidoctor::PDF::Converter - Open' do
(expect to_file).to visually_match 'open-unbreakable-option-fit.pdf'
end
- it 'should break an unbreakable block if it does not fit on one page' do
+ it 'should break an unbreakable block if it does not fit on one page', visual: true do
to_file = to_pdf_file <<~EOS, 'open-unbreakable-option-break.pdf'
Make it rain.footnote:[money]
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 4a1f6476..6b0ee880 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -547,7 +547,7 @@ end
RSpec::Matchers.define :visually_match do |reference_filename|
reference_path = (Pathname.new reference_filename).absolute? ? reference_filename : (File.join __dir__, 'reference', reference_filename)
match do |actual_path|
- # NOTE add this line to detect which tests use a visual match
+ # NOTE uncomment this line and run `bundle exec rspec -t ~visual` to detect which tests use a visual match
#warn caller.find {|it| it.include? '_spec.rb:' }
return false unless File.exist? reference_path
images_output_dir = output_file 'visual-comparison-workdir'