spec/vagrant-winrm/commands/winrm_spec.rb in vagrant-winrm-0.5.0 vs spec/vagrant-winrm/commands/winrm_spec.rb in vagrant-winrm-0.6.0

- old
+ new

@@ -4,16 +4,10 @@ describe VagrantPlugins::VagrantWinRM::WinRM, :unit => true do =begin ############ # Here we mock! =end ############## - - let(:idx) { double('idx') } - let(:communicator) { double('communicator') } - let(:config_vm) { double('config_vm', communicator: :winrm) } - let(:machine_config) { double('machine_config', vm: config_vm) } - let(:machine) { double('machine', config: machine_config, name: 'vagrant', provider: 'virtualbox', config: machine_config, communicate: communicator, ui: double('ui', opts: {})) } - let(:env) { double('env', root_path: '', home_path: '', ui_class: '', machine_names: [machine.name], active_machines: [machine], machine_index: idx, default_provider: 'virtualbox') } + mock_env before do # Mock the local env creation allow(machine).to receive(:vagrant_env).with('', { :ui_class => '' }).and_return env