GabrielRotbart/gatling — pull request #1 by fsat (2012-05-14 02:40:09+00:00)
Title: Fixes + support for comparing elements with different size

Fixes:
* Don't overwrite candidate image w/ diff image.
* Fix the incorrect argument for Gatling::Comparison.new inside compare_until_match method - the actual and expected image is accidentally flipped, causing the incorrect image to be saved as candidate image.

Changes:
* Support for comparing elements with 2 different pixel size.
* Add default arguments for max no of tries and sleep time in Gatling.compare_until_match method.

The support for comparing elements with 2 different pixel size are done inside Gatling::Comparison.compare_images_with_different_size using the following steps:

* Clone both actual and reference image
* Reset the clones' offset to 0 (this will make sure both clones' 0x0 coordinate starts at the top left of the image)
* Extend the clones to max width and height of both elements

Once these are done, RMagick's compare method is then called.