Sha256: 7323042e9700a045fd6a591ca0b5647e631fe4cf07a27d073e000212bfc2c4ce
Contents?: true
Size: 763 Bytes
Versions: 3
Compression:
Stored size: 763 Bytes
Contents
#! /usr/bin/env ruby require 'spec_helper' describe "Kernel version fact" do describe "on Solaris/Sun OS" do before do Facter.fact(:kernel).stubs(:value).returns('sunos') Facter::Core::Execution.stubs(:exec).with('uname -v').returns("1.234.5") end it "should return the kernel version using 'uname -v'" do Facter.fact(:kernelversion).value.should == "1.234.5" end end describe "on everything else" do before do Facter.fact(:kernel).stubs(:value).returns('linux') Facter.fact(:kernelrelease).stubs(:value).returns('1.23.4-56') end it "should return the kernel version using kernel release" do Facter.fact(:kernelversion).value.should == "1.23.4" end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
facter-2.0.1.rc1 | spec/unit/kernelversion_spec.rb |
facter-2.0.1.rc1-x86-mingw32 | spec/unit/kernelversion_spec.rb |
facter-2.0.1.rc1-universal-darwin | spec/unit/kernelversion_spec.rb |