spec/beaker/hypervisor/vagrant_spec.rb in beaker-1.8.1 vs spec/beaker/hypervisor/vagrant_spec.rb in beaker-1.8.2
- old
+ new
@@ -1,10 +1,11 @@
require 'spec_helper'
module Beaker
describe Vagrant do
- let( :vagrant ) { Beaker::Vagrant.new( @hosts, make_opts ) }
+ let( :options ) { make_opts.merge({ 'logger' => double().as_null_object }) }
+ let( :vagrant ) { Beaker::Vagrant.new( @hosts, options ) }
before :each do
@hosts = make_hosts()
end
@@ -59,21 +60,21 @@
host = @hosts[0]
host[:platform] = 'unix'
Command.should_receive( :new ).with("sudo su -c \"cp -r .ssh /root/.\"").once
- vagrant.copy_ssh_to_root( host )
+ vagrant.copy_ssh_to_root( host, options )
end
it "can copy to Administrator on windows" do
host = @hosts[0]
host[:platform] = 'windows'
Command.should_receive( :new ).with("sudo su -c \"cp -r .ssh /home/Administrator/.\"").once
- vagrant.copy_ssh_to_root( host )
+ vagrant.copy_ssh_to_root( host, options )
end
end
it "can generate a ssh-config file" do
@@ -138,10 +139,10 @@
FakeFS.activate!
vagrant.should_receive( :vagrant_cmd ).with( "up" ).once
@hosts.each do |host|
host_prev_name = host['user']
vagrant.should_receive( :set_ssh_config ).with( host, 'vagrant' ).once
- vagrant.should_receive( :copy_ssh_to_root ).with( host ).once
+ vagrant.should_receive( :copy_ssh_to_root ).with( host, options ).once
vagrant.should_receive( :set_ssh_config ).with( host, host_prev_name ).once
end
vagrant.should_receive( :hack_etc_hosts ).with( @hosts ).once
end