Sha256: c46d55aa06c223e0d629e0334cd9eb1bbde355d16e9fca9c3bdb6694f7263f38

Contents?: true

Size: 1.27 KB

Versions: 103

Compression:

Stored size: 1.27 KB

Contents

require 'spec_helper'

describe Beaker::VagrantFusion do
  let( :options ) { make_opts.merge({ :hosts_file => 'sample.cfg', 'logger' => double().as_null_object }) }
  let( :vagrant ) { Beaker::VagrantFusion.new( @hosts, options ) }

  before :each do
    @hosts = make_hosts()
  end

  it "uses the vmware_fusion provider for provisioning" do
    @hosts.each do |host|
      host_prev_name = host['user']
      expect( vagrant ).to receive( :set_ssh_config ).with( host, 'vagrant' ).once
      expect( vagrant ).to receive( :copy_ssh_to_root ).with( host, options ).once
      expect( vagrant ).to receive( :set_ssh_config ).with( host, host_prev_name ).once
    end
    expect( vagrant ).to receive( :hack_etc_hosts ).with( @hosts, options ).once
    expect( vagrant ).to receive( :vagrant_cmd ).with( "up --provider vmware_fusion" ).once
    vagrant.provision
  end

  it "can make a Vagranfile for a set of hosts" do
    path = vagrant.instance_variable_get( :@vagrant_path )
    allow( vagrant ).to receive( :randmac ).and_return( "0123456789" )

    vagrant.make_vfile( @hosts )

    vagrantfile = File.read( File.expand_path( File.join( path, "Vagrantfile")))
    expect( vagrantfile ).to include( %Q{    v.vm.provider :vmware_fusion do |v|\n      v.vmx['memsize'] = '1024'\n    end})
  end
end

Version data entries

103 entries across 103 versions & 2 rubygems

Version Path
beaker-2.48.1 spec/beaker/hypervisor/vagrant_fusion_spec.rb
beaker-2.48.0 spec/beaker/hypervisor/vagrant_fusion_spec.rb
beaker-2.47.1 spec/beaker/hypervisor/vagrant_fusion_spec.rb
beaker-2.47.0 spec/beaker/hypervisor/vagrant_fusion_spec.rb
beaker-2.46.0 spec/beaker/hypervisor/vagrant_fusion_spec.rb
beaker-2.45.0 spec/beaker/hypervisor/vagrant_fusion_spec.rb
beaker-2.44.0 spec/beaker/hypervisor/vagrant_fusion_spec.rb
beaker-2.43.0 spec/beaker/hypervisor/vagrant_fusion_spec.rb
beaker-2.42.0 spec/beaker/hypervisor/vagrant_fusion_spec.rb
beaker-2.41.0 spec/beaker/hypervisor/vagrant_fusion_spec.rb
beaker-2.40.0 spec/beaker/hypervisor/vagrant_fusion_spec.rb
beaker-2.39.0 spec/beaker/hypervisor/vagrant_fusion_spec.rb
beaker-2.38.1 spec/beaker/hypervisor/vagrant_fusion_spec.rb
beaker-2.38.0 spec/beaker/hypervisor/vagrant_fusion_spec.rb
beaker-2.37.0 spec/beaker/hypervisor/vagrant_fusion_spec.rb
beaker-2.36.0 spec/beaker/hypervisor/vagrant_fusion_spec.rb
beaker-2.35.0 spec/beaker/hypervisor/vagrant_fusion_spec.rb
beaker-2.34.0 spec/beaker/hypervisor/vagrant_fusion_spec.rb
beaker-2.33.0 spec/beaker/hypervisor/vagrant_fusion_spec.rb
beaker-2.32.1 spec/beaker/hypervisor/vagrant_fusion_spec.rb