Sha256: e491a87eb2f25c00a7f66f057322acc3f9bc274696d1892de3e2a408734895d2

Contents?: true

Size: 1.06 KB

Versions: 56

Compression:

Stored size: 1.06 KB

Contents

#! /usr/bin/env ruby

require 'spec_helper'

describe "lsbrelease 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 'distrelease' key from the 'os' fact" do
    Facter.fact(:kernel).stubs(:value).returns("Linux")
    Facter.fact("os").stubs(:value).returns(os_hash)
    Facter.fact(:lsbrelease).value.should eq "1.2.3"
  end
end

Version data entries

56 entries across 56 versions & 1 rubygems

Version Path
facter-2.5.7 spec/unit/lsbrelease_spec.rb
facter-2.5.7-x86-mingw32 spec/unit/lsbrelease_spec.rb
facter-2.5.7-x64-mingw32 spec/unit/lsbrelease_spec.rb
facter-2.5.7-universal-darwin spec/unit/lsbrelease_spec.rb
facter-2.5.6-x86-mingw32 spec/unit/lsbrelease_spec.rb
facter-2.5.6-x64-mingw32 spec/unit/lsbrelease_spec.rb
facter-2.5.6-universal-darwin spec/unit/lsbrelease_spec.rb
facter-2.5.6 spec/unit/lsbrelease_spec.rb
facter-2.5.5-x86-mingw32 spec/unit/lsbrelease_spec.rb
facter-2.5.5-x64-mingw32 spec/unit/lsbrelease_spec.rb
facter-2.5.5-universal-darwin spec/unit/lsbrelease_spec.rb
facter-2.5.5 spec/unit/lsbrelease_spec.rb
facter-2.5.4-x86-mingw32 spec/unit/lsbrelease_spec.rb
facter-2.5.4-x64-mingw32 spec/unit/lsbrelease_spec.rb
facter-2.5.4-universal-darwin spec/unit/lsbrelease_spec.rb
facter-2.5.4 spec/unit/lsbrelease_spec.rb
facter-2.5.1 spec/unit/lsbrelease_spec.rb
facter-2.5.1-x86-mingw32 spec/unit/lsbrelease_spec.rb
facter-2.5.1-x64-mingw32 spec/unit/lsbrelease_spec.rb
facter-2.5.1-universal-darwin spec/unit/lsbrelease_spec.rb