From 473877202bec449bffd54eabe42a1b02c0dfd22d Mon Sep 17 00:00:00 2001 From: Cmcmahon Date: Fri, 21 Nov 2014 09:40:17 -0700 Subject: [PATCH] [BrowserTest] rubocop change to an if() Change-Id: I5ae9ec4d94af88fa67ac8de58a38b6ea03b14acc --- .rubocop_todo.yml | 5 ----- .../tests/browser/features/support/language_screenshot.rb | 4 +--- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 8cf6572b93..cf265f1918 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -36,8 +36,3 @@ Style/Documentation: Style/GlobalVars: Enabled: false -# Offense count: 1 -# Configuration parameters: MaxLineLength. -Style/IfUnlessModifier: - Enabled: false - diff --git a/modules/ve-mw/tests/browser/features/support/language_screenshot.rb b/modules/ve-mw/tests/browser/features/support/language_screenshot.rb index dad782dfe3..29870f5bc1 100644 --- a/modules/ve-mw/tests/browser/features/support/language_screenshot.rb +++ b/modules/ve-mw/tests/browser/features/support/language_screenshot.rb @@ -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