Compare deliberately
Channel deltas or YIQ comparison with allowed-pixel limits.
Visual regression testing · Ruby
Compare rendered images in Ruby and turn mismatches into useful diffs.
gem install lookalike
Choose pixel or perceptual comparison, set tolerances, and inspect the affected region.
Channel deltas or YIQ comparison with allowed-pixel limits.
Bounding boxes, diff images, and optional antialiasing detection.
RSpec, Minitest, Test::Unit, and local snapshot approval.
A small first step
Install the gem, then follow the project guide for platform requirements and the full API.
require "lookalike"
require "tessel"
actual = Tessel.read("actual.png")
result = Lookalike.compare(
"expected.png", actual,
mode: :channel, max_delta: 1
)
abort result.inspect unless result.match?