[BrowserTest] rubocop change to an if()

Change-Id: I5ae9ec4d94af88fa67ac8de58a38b6ea03b14acc
This commit is contained in:
Cmcmahon 2014-11-21 09:40:17 -07:00
parent 3d61fe724d
commit 473877202b
2 changed files with 1 additions and 8 deletions

View file

@ -36,8 +36,3 @@ Style/Documentation:
Style/GlobalVars:
Enabled: false
# Offense count: 1
# Configuration parameters: MaxLineLength.
Style/IfUnlessModifier:
Enabled: false

View file

@ -34,9 +34,7 @@ def crop_image(path, page_elements, offset_element)
# It happens with some elements that an image goes off the screen a bit,
# and chunky_png fails when this happens
if image.width < top_left_x + width
width = image.width - top_left_x
end
width = image.width - top_left_x if image.width < top_left_x + width
image.crop!(top_left_x, top_left_y, width, height)
image.save path