Fixed Style/StringLiterals RuboCop offense

See:
https://github.com/bbatsov/ruby-style-guide#consistent-string-literals
Bug: T117986

Change-Id: I60b1598831bbe9fe84c40bf82434cfd22cdd7eff
This commit is contained in:
Željko Filipin 2015-11-25 15:55:57 +01:00
parent ea3c8c4f61
commit 6dc07c119a
6 changed files with 14 additions and 30 deletions

View file

@ -1,5 +1,3 @@
inherit_from: .rubocop_todo.yml
AllCops:
StyleGuideCopsOnly: true
@ -15,9 +13,8 @@ Style/Alias:
Style/SignalException:
Enabled: false
# uncomment when fixed
# Style/StringLiterals:
# EnforcedStyle: single_quotes
Style/StringLiterals:
EnforcedStyle: single_quotes
Style/TrivialAccessors:
ExactNameMatch: true

View file

@ -1,13 +0,0 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2015-11-25 15:48:57 +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: 15
# Cop supports --auto-correct.
# Configuration parameters: SupportedStyles.
Style/StringLiterals:
EnforcedStyle: double_quotes

View file

@ -1,4 +1,4 @@
source "https://rubygems.org"
source 'https://rubygems.org'
gem "mediawiki_selenium", "~> 1.6.2"
gem "rubocop", "~> 0.35.1", require: false
gem 'mediawiki_selenium', '~> 1.6.2'
gem 'rubocop', '~> 0.35.1', require: false

View file

@ -1,14 +1,14 @@
require "bundler/setup"
require 'bundler/setup'
require "rubocop/rake_task"
require 'rubocop/rake_task'
RuboCop::RakeTask.new(:rubocop) do |task|
# If you use mediawiki-vagrant, rubocop will by default use it's .rubocop.yml
# The next line makes it explicit that you want .rubocop.yml from the
# directory where `bundle exec rake` is executed:
task.options = ["-c", ".rubocop.yml"]
task.options = ['-c', '.rubocop.yml']
end
task default: [:test]
desc "Run all build/tests commands (CI entry point)"
desc 'Run all build/tests commands (CI entry point)'
task test: [:rubocop]

View file

@ -1,3 +1,3 @@
require "mediawiki_selenium/cucumber"
require "mediawiki_selenium/pages"
require "mediawiki_selenium/step_definitions"
require 'mediawiki_selenium/cucumber'
require 'mediawiki_selenium/pages'
require 'mediawiki_selenium/step_definitions'

View file

@ -12,6 +12,6 @@
class PdfPage
include PageObject
a(:download_as_pdf, text: "Download as PDF")
a(:download_the_file, text: "Download the file")
a(:download_as_pdf, text: 'Download as PDF')
a(:download_the_file, text: 'Download the file')
end