Sha256: aad592c4830185b765398c2358bb25be9e042900085e8d51e814780d035e81cb
Contents?: true
Size: 770 Bytes
Versions: 40
Compression:
Stored size: 770 Bytes
Contents
#!/usr/bin/env ruby require 'spec_helper' require 'facter' describe "Uniqueid fact" do it "should match hostid on Solaris" do Facter.fact(:kernel).stubs(:value).returns("SunOS") Facter::Util::Resolution.stubs(:exec).with("hostid").returns("Larry") Facter.fact(:uniqueid).value.should == "Larry" end it "should match hostid on Linux" do Facter.fact(:kernel).stubs(:value).returns("Linux") Facter::Util::Resolution.stubs(:exec).with("hostid").returns("Curly") Facter.fact(:uniqueid).value.should == "Curly" end it "should match hostid on AIX" do Facter.fact(:kernel).stubs(:value).returns("AIX") Facter::Util::Resolution.stubs(:exec).with("hostid").returns("Moe") Facter.fact(:uniqueid).value.should == "Moe" end end
Version data entries
40 entries across 40 versions & 2 rubygems