Sha256: 76d04c46bf5e832f0c448123c4b2ba0074206dece6175d1b0fca3182d8677822
Contents?: true
Size: 728 Bytes
Versions: 9
Compression:
Stored size: 728 Bytes
Contents
#!/usr/bin/env rspec require 'spec_helper' describe "lsbrelease fact" do [ "Linux", "GNU/kFreeBSD"].each do |kernel| describe "on #{kernel}" do before :each do Facter.fact(:kernel).stubs(:value).returns kernel end it "should return the release through lsb_release -v -s 2>/dev/null" do Facter::Util::Resolution.stubs(:exec).with('lsb_release -v -s 2>/dev/null').returns 'n/a' Facter.fact(:lsbrelease).value.should == 'n/a' end it "should return nil if lsb_release is not installed" do Facter::Util::Resolution.stubs(:exec).with('lsb_release -v -s 2>/dev/null').returns nil Facter.fact(:lsbrelease).value.should be_nil end end end end
Version data entries
9 entries across 9 versions & 2 rubygems