spec/vagrant-windows/helper_spec.rb in vagrant-windows-1.2.0 vs spec/vagrant-windows/helper_spec.rb in vagrant-windows-1.2.1
- old
+ new
@@ -1,6 +1,7 @@
require 'spec_helper'
+require 'mocha/api'
describe VagrantWindows::Helper , :unit => true do
class DummyHelper
include VagrantWindows::Helper
@@ -29,9 +30,27 @@
@dummy.win_friendly_share_id('sharename').should eq('sharename')
end
it "should use last folder name in guest_path" do
@dummy.win_friendly_share_id('/tmp/folder/sharename').should eq('tmp_folder_sharename')
+ end
+
+ end
+
+ describe "is_vmware" do
+ it "should be true for vmware_fusion" do
+ machine = stub(:provider_name => :vmware_fusion)
+ expect(@dummy.is_vmware(machine)).to be_true
+ end
+
+ it "should be true for vmware_workstation" do
+ machine = stub(:provider_name => :vmware_workstation)
+ expect(@dummy.is_vmware(machine)).to be_true
+ end
+
+ it "should be false for virtual_box" do
+ machine = stub(:provider_name => :virtual_box)
+ expect(@dummy.is_vmware(machine)).to be_false
end
end
end