Skip to content

Instantly share code, notes, and snippets.

View wellavelino's full-sized avatar
🎧
Focusing

Wellington Avelino dos Santos wellavelino

🎧
Focusing
View GitHub Profile
@wellavelino
wellavelino / compare.rb
Last active November 22, 2017 19:06 — forked from mashhoodr/compare.rb
Comparing images in cucumber - calabash
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