Enable Style/UnneededCapitalW Rubocop cop

This commit is contained in:
Grzegorz Bizon 2016-06-30 13:31:52 +02:00
parent 2efee5f641
commit efd70c1878
3 changed files with 5 additions and 5 deletions

View file

@ -681,7 +681,7 @@ Style/UnlessElse:
# Checks for %W when interpolation is not needed.
Style/UnneededCapitalW:
Enabled: false
Enabled: true
# TODO: Enable UnneededInterpolation Cop.
# Checks for strings that are just an interpolated expression.

View file

@ -39,7 +39,7 @@ module Gitlab
# OpenSSH 6.8 introduces a new default output format for fingerprints.
# Check the version and decide which command to use.
version_output, version_status = popen(%W(ssh -V))
version_output, version_status = popen(%w(ssh -V))
return false unless version_status.zero?
version_matches = version_output.match(/OpenSSH_(?<major>\d+)\.(?<minor>\d+)/)

View file

@ -10,7 +10,7 @@ describe 'Gitlab::Popen', lib: true, no_db: true do
context 'zero status' do
before do
@output, @status = @klass.new.popen(%W(ls), path)
@output, @status = @klass.new.popen(%w(ls), path)
end
it { expect(@status).to be_zero }
@ -19,7 +19,7 @@ describe 'Gitlab::Popen', lib: true, no_db: true do
context 'non-zero status' do
before do
@output, @status = @klass.new.popen(%W(cat NOTHING), path)
@output, @status = @klass.new.popen(%w(cat NOTHING), path)
end
it { expect(@status).to eq(1) }
@ -34,7 +34,7 @@ describe 'Gitlab::Popen', lib: true, no_db: true do
context 'without a directory argument' do
before do
@output, @status = @klass.new.popen(%W(ls))
@output, @status = @klass.new.popen(%w(ls))
end
it { expect(@status).to be_zero }