Sha256: fa7813f0b862ad6eca7e3f566945b32747bcbb8f42e2b1dca3283dcd2ce6851f

Contents?: true

Size: 709 Bytes

Versions: 206

Compression:

Stored size: 709 Bytes

Contents

require 'spec_helper'
require 'specinfra/helper/detect_os/esxi'

describe Specinfra::Helper::DetectOs::Esxi do
  esxi = Specinfra::Helper::DetectOs::Esxi.new(:exec)
  it 'Should return esxi when esxi is installed.' do
    allow(esxi).to receive(:run_command) {
      CommandResult.new(:stdout => 'VMware ESXi 5.0.0 build-123445', :exit_status => 0)
    }
    expect(esxi.detect).to include(
      :family  => 'esxi',
      :release => '5.0.0 build-123445'
    )
  end

  it 'Should not return esxi when VMware Workstation is installed.' do
    allow(esxi).to receive(:run_command) {
      CommandResult.new(:stdout => 'VMware Workstation', :exit_status => 0)
    }
    expect(esxi.detect).to be_nil
  end
end

Version data entries

206 entries across 206 versions & 3 rubygems

Version Path
specinfra-2.76.5 spec/helper/detect_os/esxi_spec.rb
specinfra-2.76.4 spec/helper/detect_os/esxi_spec.rb
specinfra-2.76.3 spec/helper/detect_os/esxi_spec.rb
specinfra-2.76.2 spec/helper/detect_os/esxi_spec.rb
specinfra-2.76.1 spec/helper/detect_os/esxi_spec.rb
specinfra-2.76.0 spec/helper/detect_os/esxi_spec.rb
specinfra-2.75.1 spec/helper/detect_os/esxi_spec.rb
specinfra-rb19-2.44.7 spec/helper/detect_os/esxi_spec.rb
specinfra-2.75.0 spec/helper/detect_os/esxi_spec.rb
specinfra-2.74.0 spec/helper/detect_os/esxi_spec.rb
specinfra-2.73.4 spec/helper/detect_os/esxi_spec.rb
specinfra-2.73.3 spec/helper/detect_os/esxi_spec.rb
specinfra-2.73.2 spec/helper/detect_os/esxi_spec.rb
specinfra-2.73.1 spec/helper/detect_os/esxi_spec.rb
specinfra-2.73.0 spec/helper/detect_os/esxi_spec.rb
specinfra-2.72.1 spec/helper/detect_os/esxi_spec.rb
specinfra-2.72.0 spec/helper/detect_os/esxi_spec.rb
specinfra-2.71.3 spec/helper/detect_os/esxi_spec.rb
specinfra-2.71.2 spec/helper/detect_os/esxi_spec.rb
specinfra-2.71.1 spec/helper/detect_os/esxi_spec.rb