From ae155fe526b4c246ef3b0a9bc988f0c6acf03ef4 Mon Sep 17 00:00:00 2001 From: tphoney Date: Wed, 20 Mar 2019 17:14:33 +0000 Subject: [PATCH] (bugfix) set kernel for facter version test --- spec/unit/apache_version_spec.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spec/unit/apache_version_spec.rb b/spec/unit/apache_version_spec.rb index c2db7a2217..0f155ab1b0 100644 --- a/spec/unit/apache_version_spec.rb +++ b/spec/unit/apache_version_spec.rb @@ -7,6 +7,7 @@ describe 'apache_version' do context 'with value' do before :each do + allow(Facter.fact(:kernel)).to receive(:value).and_return('Linux') expect(Facter::Util::Resolution).to receive(:which).with('apachectl') { true } expect(Facter::Util::Resolution).to receive(:exec).with('apachectl -v 2>&1') { 'Server version: Apache/2.4.16 (Unix) @@ -22,6 +23,7 @@ describe 'apache_version with empty OS' do context 'with value' do before :each do + allow(Facter.fact(:kernel)).to receive(:value).and_return('Linux') expect(Facter::Util::Resolution).to receive(:which).with('apachectl') { true } expect(Facter::Util::Resolution).to receive(:exec).with('apachectl -v 2>&1') { 'Server version: Apache/2.4.6 ()