Module: Test::Unit::PdfMatcher::Assertions
- Defined in:
- lib/test/unit/pdf_matcher/assertions.rb
Instance Method Summary collapse
-
#assert_match_pdf(expected_pdf, actual_pdf, output_diff_path: nil) ⇒ Object
Passes if PdfMatcher.match?(‘expected_pdf`, `actual_pdf`).
Instance Method Details
#assert_match_pdf(expected_pdf, actual_pdf, output_diff_path: nil) ⇒ Object
Passes if PdfMatcher.match?(‘expected_pdf`, `actual_pdf`). See github.com/hidakatsuya/pdf_matcher for details about PdfMatcher.
17 18 19 20 21 22 23 24 |
# File 'lib/test/unit/pdf_matcher/assertions.rb', line 17 def assert_match_pdf(expected_pdf, actual_pdf, output_diff_path: nil) = ['The PDF contents did not match.'].tap { |msgs| msgs << "Check #{output_diff_path} for details of the differences." if output_diff_path } assert_block(.join(' ')) do ::PdfMatcher.match?(expected_pdf, actual_pdf, output_diff: output_diff_path) end end |