Sha256: 9db9c7d157a19dd353b0c8feffc9dc91cd6c80a5dbdf06bdc30d0f8d5eddbd31
Contents?: true
Size: 641 Bytes
Versions: 15
Compression:
Stored size: 641 Bytes
Contents
#! /usr/bin/env ruby -S rspec require 'spec_helper' describe "Kernel fact" do include FacterSpec::ConfigHelper describe "on Windows" do it "should return the kernel as 'windows'" do given_a_configuration_of(:is_windows => true, :data_dir => "data_dir") Facter.fact(:kernel).value.should == "windows" end end describe "on everything else" do it "should return the kernel using 'uname -s'" do given_a_configuration_of(:is_windows => false) Facter::Util::Resolution.stubs(:exec).with('uname -s').returns("test_kernel") Facter.fact(:kernel).value.should == 'test_kernel' end end end
Version data entries
15 entries across 15 versions & 1 rubygems