Sha256: a8e9bf6000cd542c0082366ad53e0a71e0dff59d05f23004aded7730cda2cdc1

Contents?: true

Size: 903 Bytes

Versions: 192

Compression:

Stored size: 903 Bytes

Contents

require 'spec_helper'

describe Specinfra::HostInventory::Kernel do
  describe 'Example of CentOS 6.6 Kernel version 2.6.32-504.30.3.el6.x86_64' do
    str = 'Linux 2.6.32-504.30.3.el6.x86_64'

    let(:host_inventory) { nil }
    ret = Specinfra::HostInventory::Kernel.new(host_inventory).parse_uname(str)
    example "name" do
      expect(ret["name"]).to eq("Linux")
    end
    example "release" do
      expect(ret["release"]).to eq("2.6.32-504.30.3.el6.x86_64")
    end
    example "version" do
      expect(ret["version"]).to eq("2.6.32")
    end
    example "major" do
      expect(ret["version_major"]).to eq("2.6")
    end
  end

  describe 'Example of unparseable output' do
    str = 'unparseable output'

    let(:host_inventory) { nil }
    ret = Specinfra::HostInventory::Kernel.new(host_inventory).parse_uname(str)

    example 'is nil' do
      expect(ret).to be(nil)
    end
  end
end

Version data entries

192 entries across 192 versions & 3 rubygems

Version Path
specinfra-2.91.0 spec/host_inventory/linux/kernel_spec.rb
specinfra-2.90.1 spec/host_inventory/linux/kernel_spec.rb
specinfra-2.90.0 spec/host_inventory/linux/kernel_spec.rb
specinfra-2.89.0 spec/host_inventory/linux/kernel_spec.rb
specinfra-2.88.2 spec/host_inventory/linux/kernel_spec.rb
specinfra-2.88.1 spec/host_inventory/linux/kernel_spec.rb
specinfra-2.88.0 spec/host_inventory/linux/kernel_spec.rb
specinfra-2.87.2 spec/host_inventory/linux/kernel_spec.rb
specinfra-2.87.1 spec/host_inventory/linux/kernel_spec.rb
specinfra-2.87.0 spec/host_inventory/linux/kernel_spec.rb
specinfra-2.86.0 spec/host_inventory/linux/kernel_spec.rb
specinfra-2.85.1 spec/host_inventory/linux/kernel_spec.rb
specinfra-2.85.0 spec/host_inventory/linux/kernel_spec.rb
specinfra-2.84.1 spec/host_inventory/linux/kernel_spec.rb
specinfra-2.84.0 spec/host_inventory/linux/kernel_spec.rb
specinfra-2.83.4 spec/host_inventory/linux/kernel_spec.rb
specinfra-2.83.3 spec/host_inventory/linux/kernel_spec.rb
specinfra-2.83.2 spec/host_inventory/linux/kernel_spec.rb
specinfra-2.83.1 spec/host_inventory/linux/kernel_spec.rb
specinfra-2.83.0 spec/host_inventory/linux/kernel_spec.rb