From 095ac9e75e28fd231a81e2508aac7638ebc84c47 Mon Sep 17 00:00:00 2001 From: Tim Sharpe Date: Sun, 3 Feb 2019 11:24:18 +1100 Subject: [PATCH] (rubocop) Fix Style/WordArray --- lib/vmfloaty/utils.rb | 2 +- spec/vmfloaty/pooler_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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