Class: PdfMatcher::Testing::Matcher::MatchPdf
- Inherits:
-
Object
- Object
- PdfMatcher::Testing::Matcher::MatchPdf
- Includes:
- RSpec::Matchers::Composable
- Defined in:
- lib/pdf_matcher/testing/matcher.rb
Instance Method Summary collapse
- #description ⇒ Object
- #failure_message ⇒ Object
-
#initialize(expected_pdf, output_diff) ⇒ MatchPdf
constructor
A new instance of MatchPdf.
- #matches?(actual_pdf) ⇒ Boolean
Constructor Details
#initialize(expected_pdf, output_diff) ⇒ MatchPdf
Returns a new instance of MatchPdf.
16 17 18 19 |
# File 'lib/pdf_matcher/testing/matcher.rb', line 16 def initialize(expected_pdf, output_diff) @expected_pdf = expected_pdf @output_diff = output_diff end |
Instance Method Details
#description ⇒ Object
29 30 31 |
# File 'lib/pdf_matcher/testing/matcher.rb', line 29 def description 'match the expected pdf' end |
#failure_message ⇒ Object
25 26 27 |
# File 'lib/pdf_matcher/testing/matcher.rb', line 25 def FailureMessage.build(@output_diff) end |
#matches?(actual_pdf) ⇒ Boolean
21 22 23 |
# File 'lib/pdf_matcher/testing/matcher.rb', line 21 def matches?(actual_pdf) PdfMatcher.match?(@expected_pdf, actual_pdf, output_diff: @output_diff) end |