Sha256: 1c8505163b8ed4e6df12aacc5855ac1ad20b74f0672b4387a3612cb4f32637d1

Contents?: true

Size: 1.06 KB

Versions: 56

Compression:

Stored size: 1.06 KB

Contents

#! /usr/bin/env ruby

require 'spec_helper'

describe "lsbdistcodename fact" do
  let(:os_hash) { { "name"          => "SomeOS",
                    "family"        => "SomeFamily",
                    "release"       => {
                      "major" => "1",
                      "minor" => "2",
                      "full"  => "1.2.3"
                    },
                    "lsb"           => {
                       "distcodename"      => "SomeCodeName",
                       "distid"            => "SomeID",
                       "distdescription"   => "SomeDesc",
                       "distrelease"       => "1.2.3",
                       "release"           => "1.2.3",
                       "majdistrelease"    => "1",
                       "minordistrelease"  => "2"
                    },
                  }
                }

  it "should use the 'distcodename' key of the 'os' fact" do
    Facter.fact(:kernel).stubs(:value).returns("Linux")
    Facter.fact("os").stubs(:value).returns(os_hash)
    Facter.fact(:lsbdistid).value.should eq "SomeID"
  end
end

Version data entries

56 entries across 56 versions & 1 rubygems

Version Path
facter-2.4.1 spec/unit/lsbdistid_spec.rb
facter-2.4.1-x86-mingw32 spec/unit/lsbdistid_spec.rb
facter-2.4.1-x64-mingw32 spec/unit/lsbdistid_spec.rb
facter-2.4.1-universal-darwin spec/unit/lsbdistid_spec.rb
facter-2.4.0 spec/unit/lsbdistid_spec.rb
facter-2.4.0-x86-mingw32 spec/unit/lsbdistid_spec.rb
facter-2.4.0-x64-mingw32 spec/unit/lsbdistid_spec.rb
facter-2.4.0-universal-darwin spec/unit/lsbdistid_spec.rb
facter-2.3.0 spec/unit/lsbdistid_spec.rb
facter-2.3.0-x86-mingw32 spec/unit/lsbdistid_spec.rb
facter-2.3.0-x64-mingw32 spec/unit/lsbdistid_spec.rb
facter-2.3.0-universal-darwin spec/unit/lsbdistid_spec.rb
facter-2.2.0 spec/unit/lsbdistid_spec.rb
facter-2.2.0-x86-mingw32 spec/unit/lsbdistid_spec.rb
facter-2.2.0-x64-mingw32 spec/unit/lsbdistid_spec.rb
facter-2.2.0-universal-darwin spec/unit/lsbdistid_spec.rb