Fixed Style/VariableName RuboCop offense

See:
https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-v
ars
Bug: T117984

Change-Id: I51b5ee142bc845b799b53e356a604aefb13d7f7d
This commit is contained in:
Željko Filipin 2015-12-09 17:17:24 +01:00
parent fba53b776c
commit 810506a063
3 changed files with 7 additions and 12 deletions

View file

@ -1,15 +1,15 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2015-12-09 16:08:32 +0100 using RuboCop version 0.35.1.
# on 2015-12-09 17:16:31 +0100 using RuboCop version 0.35.1.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.
# Offense count: 26
# Offense count: 76
# Configuration parameters: AllowURI, URISchemes.
Metrics/LineLength:
Max: 252
Max: 254
# Offense count: 3
# Configuration parameters: AllowedVariables.
@ -22,8 +22,3 @@ Style/GlobalVars:
# Configuration parameters: EnforcedStyle, SupportedStyles.
Style/StringLiterals:
Enabled: false
# Offense count: 3
# Configuration parameters: EnforcedStyle, SupportedStyles.
Style/VariableName:
Enabled: false

View file

@ -31,8 +31,8 @@ end
Then /^the wiki article should be scrolled to the same position as before opening MMV$/ do
on(E2ETestPage) do |page|
@scrollDifference = page.execute_script("return $(window).scrollTop();") - @articleScrollTop
expect(@scrollDifference.abs).to be < 2
scroll_difference = page.execute_script("return $(window).scrollTop();") - @article_scroll_top
expect(scroll_difference.abs).to be < 2
end
end

View file

@ -15,7 +15,7 @@ When /^I click on the first image in the article$/ do
on(E2ETestPage) do |page|
# We store the offset of the image as the scroll position and scroll to it, because cucumber/selenium
# sometimes automatically scrolls to it when we ask it to click on it (seems to depend on timing)
@articleScrollTop = page.execute_script("var scrollTop = Math.round($('a[href=\"/wiki/File:Sunrise_over_fishing_boats_in_Kerala.jpg\"]').first().find('img').offset().top); window.scrollTo(0, scrollTop); return scrollTop;")
@article_scroll_top = page.execute_script("var scrollTop = Math.round($('a[href=\"/wiki/File:Sunrise_over_fishing_boats_in_Kerala.jpg\"]').first().find('img').offset().top); window.scrollTo(0, scrollTop); return scrollTop;")
# Scrolls to the image and clicks on it
page.image1_in_article
# This is a global variable that can be used to measure performance
@ -27,7 +27,7 @@ When /^I click on the second image in the article$/ do
on(E2ETestPage) do |page|
# We store the offset of the image as the scroll position and scroll to it, because cucumber/selenium
# sometimes automatically scrolls to it when we ask it to click on it (seems to depend on timing)
@articleScrollTop = page.execute_script("var scrollTop = Math.round($('a[href=\"/wiki/File:Wikimedia_Foundation_2013_All_Hands_Offsite_-_Day_2_-_Photo_24.jpg\"]').first().find('img').offset().top); window.scrollTo(0, scrollTop); return scrollTop;")
@article_scroll_top = page.execute_script("var scrollTop = Math.round($('a[href=\"/wiki/File:Wikimedia_Foundation_2013_All_Hands_Offsite_-_Day_2_-_Photo_24.jpg\"]').first().find('img').offset().top); window.scrollTo(0, scrollTop); return scrollTop;")
# Scrolls to the image and clicks on it
page.image2_in_article
# This is a global variable that can be used to measure performance