Skip to content

Instantly share code, notes, and snippets.

Avatar
🎧
Focusing

Wellington Avelino dos Santos wellavelino

🎧
Focusing
View GitHub Profile
@wellavelino
wellavelino / compare.rb
Last active Nov 22, 2017 — forked from mashhoodr/compare.rb
Comparing images in cucumber - calabash
View compare.rb
require 'oily_png'
require 'open-uri'
include ChunkyPNG::Color
def starts_with(item, prefix)
prefix = prefix.to_s
item[0, prefix.length] == prefix
end
# compares two images on disk, returns the % difference