(rubocop) Fix Style/WordArray

This commit is contained in:
Tim Sharpe 2019-02-03 11:24:18 +11:00
parent cdb9b0ca3d
commit 095ac9e75e
2 changed files with 2 additions and 2 deletions

View file

@ -165,7 +165,7 @@ class Utils
end end
def self.get_service_object(type = '') def self.get_service_object(type = '')
nspooler_strings = ['ns', 'nspooler', 'nonstandard', 'nonstandard_pooler'] nspooler_strings = %w[ns nspooler nonstandard nonstandard_pooler]
if nspooler_strings.include? type.downcase if nspooler_strings.include? type.downcase
NonstandardPooler NonstandardPooler
else else

View file

@ -81,7 +81,7 @@ describe Pooler do
expect(vm_req).to be_an_instance_of Hash expect(vm_req).to be_an_instance_of Hash
expect(vm_req['ok']).to equal true expect(vm_req['ok']).to equal true
expect(vm_req['debian-7-i386']['hostname']).to be_an_instance_of Array expect(vm_req['debian-7-i386']['hostname']).to be_an_instance_of Array
expect(vm_req['debian-7-i386']['hostname']).to eq ['sc0o4xqtodlul5w', '4m4dkhqiufnjmxy'] expect(vm_req['debian-7-i386']['hostname']).to eq %w[sc0o4xqtodlul5w 4m4dkhqiufnjmxy]
expect(vm_req['centos-7-x86_64']['hostname']).to eq 'zb91y9qbrbf6d3q' expect(vm_req['centos-7-x86_64']['hostname']).to eq 'zb91y9qbrbf6d3q'
end end
end end