Sha256: bb2d52e8f474d6fa30078e9692ce81cb4d8671f418b7d87607c14b87ca652897
Contents?: true
Size: 812 Bytes
Versions: 9
Compression:
Stored size: 812 Bytes
Contents
#!/usr/bin/env rspec require 'spec_helper' describe "lsbdistdescription 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 description through lsb_release -d -s 2>/dev/null" do Facter::Util::Resolution.stubs(:exec).with('lsb_release -d -s 2>/dev/null').returns '"Gentoo Base System release 2.1"' Facter.fact(:lsbdistdescription).value.should == 'Gentoo Base System release 2.1' end it "should return nil if lsb_release is not installed" do Facter::Util::Resolution.stubs(:exec).with('lsb_release -d -s 2>/dev/null').returns nil Facter.fact(:lsbdistdescription).value.should be_nil end end end end
Version data entries
9 entries across 9 versions & 2 rubygems