Module: Simulacrum::Matchers
- Extended by:
- RSpec::Matchers::DSL
- Defined in:
- lib/simulacrum/matchers.rb
Class Method Summary collapse
Class Method Details
.fail_message(component, comparator) ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/simulacrum/matchers.rb', line 24 def self.(component, comparator) <<-eos The pixel change percentage exceeded the maximum threshold of #{component.acceptable_delta}%. There was a #{comparator.diff.delta_percent}% pixel difference found between \ the reference and the candidate. Reference: #{component.reference_path} Candidate: #{component.candidate_path} Diff: #{component.diff_path} Please review the diff and resolve manually. eos end |
.pending_message(component) ⇒ Object
39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/simulacrum/matchers.rb', line 39 def self.(component) <<-eos No reference image found! New candidate created: #{component.candidate_path} Please inspect this candidate image and if it looks OK then; - mark it as a reference image by renaming it to 'reference.png' - commit 'reference.png' file to your SCM of choice - rerun this spec making sure it passes using the new reference image eos end |