Sha256: fcad1e88ebccfd250260dd2570fea280b3106de8159718983760627424b4f25c

Contents?: true

Size: 854 Bytes

Versions: 49

Compression:

Stored size: 854 Bytes

Contents

require 'spec_helper'
require 'specinfra/helper/detect_os/clearlinux'

describe Specinfra::Helper::DetectOs::Clearlinux do
  clearlinux = Specinfra::Helper::DetectOs::Clearlinux.new(:exec)
  it 'Should return clearlinux & release when clearlinux is installed.' do
    allow(clearlinux).to receive(:run_command) {
      CommandResult.new(:stdout => 'Installed version: 30340', :exit_status => 0)
    }
    expect(clearlinux.detect).to include(
      :family  => 'clearlinux',
      :release => '30340'
    )
  end

  it 'Should return clearlinux but not the release when the command returns the wrong line' do
    allow(clearlinux).to receive(:run_command) {
      CommandResult.new(:stdout => 'Foobar version: 30340', :exit_status => 0)
    }
    expect(clearlinux.detect).to include(
      :family  => 'clearlinux',
      :release => nil
    )
  end
end

Version data entries

49 entries across 49 versions & 1 rubygems

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