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

Version Path
facter-1.7.6 spec/unit/kernel_spec.rb
facter-1.7.5 spec/unit/kernel_spec.rb
facter-1.7.5.rc2 spec/unit/kernel_spec.rb
facter-1.7.5.rc1 spec/unit/kernel_spec.rb
facter-1.7.4 spec/unit/kernel_spec.rb
facter-1.7.4.rc1 spec/unit/kernel_spec.rb
facter-1.7.3 spec/unit/kernel_spec.rb
facter-1.7.3.rc1 spec/unit/kernel_spec.rb
facter-1.7.2 spec/unit/kernel_spec.rb
facter-1.7.2.rc1 spec/unit/kernel_spec.rb
facter-1.7.1 spec/unit/kernel_spec.rb
facter-1.7.1.rc1 spec/unit/kernel_spec.rb
facter-1.7.0 spec/unit/kernel_spec.rb
facter-1.7.0.rc2 spec/unit/kernel_spec.rb
facter-1.7.0.rc1 spec/unit/kernel_spec.rb