From 461ce4ffcd6cd02e0b359cba8d7255d0ff0dc775 Mon Sep 17 00:00:00 2001 From: Nicolas Rodriguez Date: Mon, 24 Aug 2020 17:34:56 +0200 Subject: [PATCH] style(test): improve Ruby style --- .../repo/controls/packages_spec.rb | 31 ++++++++++--------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/test/integration/repo/controls/packages_spec.rb b/test/integration/repo/controls/packages_spec.rb index 8919c16..1481bb8 100644 --- a/test/integration/repo/controls/packages_spec.rb +++ b/test/integration/repo/controls/packages_spec.rb @@ -1,23 +1,24 @@ # frozen_string_literal: true -case platform[:family] -when 'redhat' - packages = %w[ - prometheus2 - alertmanager - node_exporter - ] -when 'debian' - packages = %w[ - prometheus - prometheus-alertmanager - prometheus-node-exporter - ] -end - control 'prometheus packages' do title 'should be installed' + packages = + case platform[:family] + when 'redhat' + %w[ + prometheus2 + alertmanager + node_exporter + ] + when 'debian' + %w[ + prometheus + prometheus-alertmanager + prometheus-node-exporter + ] + end + packages.each do |p| describe package(p) do it { should be_installed }