diff --git a/lib/vmfloaty/utils.rb b/lib/vmfloaty/utils.rb index 1759396..12b5047 100644 --- a/lib/vmfloaty/utils.rb +++ b/lib/vmfloaty/utils.rb @@ -165,7 +165,7 @@ class Utils end 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 NonstandardPooler else diff --git a/spec/vmfloaty/pooler_spec.rb b/spec/vmfloaty/pooler_spec.rb index 43524d4..1f6e8fb 100644 --- a/spec/vmfloaty/pooler_spec.rb +++ b/spec/vmfloaty/pooler_spec.rb @@ -81,7 +81,7 @@ describe Pooler do expect(vm_req).to be_an_instance_of Hash 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 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' end end