X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=3rdparty%2Fmodules%2Fsystemd%2Fspec%2Funit%2Ffacter%2Fsystemd_version_spec.rb;fp=3rdparty%2Fmodules%2Fsystemd%2Fspec%2Funit%2Ffacter%2Fsystemd_version_spec.rb;h=0000000000000000000000000000000000000000;hb=c7e7bcc28cc5dc48a7e284a3c82f33df27d1f57d;hp=5007dc69c873b98bf89b93285d83fc215184b63d;hpb=f89d8091bbf5a7bd8f86ee80abb03c729cea8d74;p=mirror%2Fdsa-puppet.git diff --git a/3rdparty/modules/systemd/spec/unit/facter/systemd_version_spec.rb b/3rdparty/modules/systemd/spec/unit/facter/systemd_version_spec.rb deleted file mode 100644 index 5007dc69c..000000000 --- a/3rdparty/modules/systemd/spec/unit/facter/systemd_version_spec.rb +++ /dev/null @@ -1,31 +0,0 @@ -require "spec_helper" - -describe Facter::Util::Fact do - before { - Facter.clear - } - - describe "systemd_version" do - context 'returns version when systemd fact present' do - before do - Facter.fact(:systemd).stubs(:value).returns(true) - end - let(:facts) { {:systemd => true} } - it do - Facter::Util::Resolution.expects(:exec).with("systemctl --version | awk '/systemd/{ print $2 }'").returns('229') - expect(Facter.value(:systemd_version)).to eq('229') - end - end - context 'returns nil when systemd fact not present' do - before do - Facter.fact(:systemd).stubs(:value).returns(false) - end - let(:facts) { {:systemd => false } } - it do - Facter::Util::Resolution.stubs(:exec) - Facter::Util::Resolution.expects(:exec).with("systemctl --version | awk '/systemd/{ print $2 }'").never - expect(Facter.value(:systemd_version)).to eq(nil) - end - end - end -end