Skip to content

Instantly share code, notes, and snippets.

@dLobatog
Created June 13, 2012 03:04
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dLobatog/2921569 to your computer and use it in GitHub Desktop.
Save dLobatog/2921569 to your computer and use it in GitHub Desktop.
Test stickers
@image_generator.put_campaign_sticker "public/images/stickers/campaign.png"
new_photo = @image_generator.photo.file_path.sub(/\./, "-sticker.")
expected_photo = File.join(Rails.root, 'spec', 'assets', 'test-result-campaign.png')
new_image = Magick::Image.read(new_photo)[0]
expected_image = Magick::Image.read(expected_photo)[0]
new_image.signature.should eql expected_image.signature
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment