Sha256: e0c8191b0ed5aa2fe3b99b39aac8191533535a712333a04a2bf0335b3f434187
Contents?: true
Size: 773 Bytes
Versions: 15
Compression:
Stored size: 773 Bytes
Contents
#! /usr/bin/env ruby -S rspec require 'spec_helper' describe "Kernel version fact" do describe "on Solaris/Sun OS" do before do Facter.fact(:kernel).stubs(:value).returns('sunos') Facter::Util::Resolution.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
15 entries across 15 versions & 1 rubygems