From 861b7a2a5dac30709ce37581b99895ee9debd53f Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Thu, 8 Sep 2016 10:13:47 -0700 Subject: [PATCH] Cookstyle cleanups Signed-off-by: Tim Smith --- test/integration/helpers/serverspec/spec_helper.rb | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/test/integration/helpers/serverspec/spec_helper.rb b/test/integration/helpers/serverspec/spec_helper.rb index 2fbdaab..cbd00f1 100644 --- a/test/integration/helpers/serverspec/spec_helper.rb +++ b/test/integration/helpers/serverspec/spec_helper.rb @@ -3,22 +3,15 @@ require 'serverspec' set :backend, :exec set :path, '/sbin:/usr/local/sbin:$PATH' -def get_family +def family fam = 'solaris2' return fam unless File.exist? '/etc/release' - File.open('/etc/release') do |file| - while line = file.gets - case line - when /^\s*(OmniOS)/ - fam = 'omnios' - end - end - end + fam = 'omnios' if File.open('/etc/release').read =~ /^\s*(OmniOS)/ fam end def postfix_conf_path - if os[:family] == 'solaris' && get_family == 'omnios' + if os[:family] == 'solaris' && family == 'omnios' '/opt/omni/etc/postfix/' else '/etc/postfix'