Sha256: 7e86bdb4c36d69dbc74893c0e28117c3d632f8b0968a2e374f226dd2155a55d1
Contents?: true
Size: 721 Bytes
Versions: 7
Compression:
Stored size: 721 Bytes
Contents
require 'spec_helper' describe "Facter::Util::Fact" do before { Facter.clear allow(Facter.fact(:kernel)).to receive(:value).and_return('Linux') allow(Facter.fact(:kernelrelease)).to receive(:value).and_return('2.6') } describe 'iptables_version' do it { allow(Facter::Util::Resolution).to receive(:exec).with('iptables --version'). and_return('iptables v1.4.7') Facter.fact(:iptables_version).value.should == '1.4.7' } end describe 'ip6tables_version' do before { allow(Facter::Util::Resolution).to receive(:exec). with('ip6tables --version').and_return('ip6tables v1.4.7') } it { Facter.fact(:ip6tables_version).value.should == '1.4.7' } end end
Version data entries
7 entries across 7 versions & 1 rubygems