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.82.25 spec/helper/detect_os/esxi_spec.rb
specinfra-2.82.24 spec/helper/detect_os/esxi_spec.rb
specinfra-2.82.23 spec/helper/detect_os/esxi_spec.rb
specinfra-2.82.22 spec/helper/detect_os/esxi_spec.rb
specinfra-2.82.21 spec/helper/detect_os/esxi_spec.rb
specinfra-2.82.20 spec/helper/detect_os/esxi_spec.rb
specinfra-2.82.19 spec/helper/detect_os/esxi_spec.rb
specinfra-2.82.18 spec/helper/detect_os/esxi_spec.rb
specinfra-2.82.17 spec/helper/detect_os/esxi_spec.rb
specinfra-2.82.16 spec/helper/detect_os/esxi_spec.rb
specinfra-2.82.15 spec/helper/detect_os/esxi_spec.rb
specinfra-2.82.14 spec/helper/detect_os/esxi_spec.rb
specinfra-2.82.13 spec/helper/detect_os/esxi_spec.rb
specinfra-2.82.12 spec/helper/detect_os/esxi_spec.rb
specinfra-2.82.11 spec/helper/detect_os/esxi_spec.rb
specinfra-2.82.10 spec/helper/detect_os/esxi_spec.rb
specinfra-2.82.9 spec/helper/detect_os/esxi_spec.rb
specinfra-2.82.8 spec/helper/detect_os/esxi_spec.rb
specinfra-2.82.7 spec/helper/detect_os/esxi_spec.rb
specinfra-2.82.6 spec/helper/detect_os/esxi_spec.rb