Sha256: 629353682b524d243b3dab67a5e68dec704ed8e2223be83696cee661c30012a3

Contents?: true

Size: 1.22 KB

Versions: 22

Compression:

Stored size: 1.22 KB

Contents

require "vagrant"
require Vagrant.source_root.join("test/unit/base")

require Vagrant.source_root.join("plugins/providers/virtualbox/config")
require Vagrant.source_root.join("plugins/providers/virtualbox/synced_folder")

describe VagrantPlugins::ProviderVirtualBox::SyncedFolder do
  let(:machine) do
    double("machine").tap do |m|
      m.stub(provider_config: VagrantPlugins::ProviderVirtualBox::Config.new)
      m.stub(provider_name: :virtualbox)
    end
  end

  subject { described_class.new }

  before do
    machine.provider_config.finalize!
  end

  describe "usable" do
    it "should be with virtualbox provider" do
      machine.stub(provider_name: :virtualbox)
      expect(subject).to be_usable(machine)
    end

    it "should not be with another provider" do
      machine.stub(provider_name: :vmware_fusion)
      expect(subject).not_to be_usable(machine)
    end

    it "should not be usable if not functional vboxsf" do
      machine.provider_config.functional_vboxsf = false
      expect(subject).to_not be_usable(machine)
    end
  end

  describe "prepare" do
    let(:driver) { double("driver") }

    before do
      machine.stub(driver: driver)
    end

    it "should share the folders" do
      pending
    end
  end
end

Version data entries

22 entries across 19 versions & 5 rubygems

Version Path
vagrant-unbundled-1.9.7.1 test/unit/plugins/providers/virtualbox/synced_folder_test.rb
vagrant-aws-mkubenka-0.7.2.pre.14 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-5333e60e2d38/test/unit/plugins/providers/virtualbox/synced_folder_test.rb
vagrant-aws-mkubenka-0.7.2.pre.11 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-5333e60e2d38/test/unit/plugins/providers/virtualbox/synced_folder_test.rb
vagrant-aws-mkubenka-0.7.2.pre.10 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-5333e60e2d38/test/unit/plugins/providers/virtualbox/synced_folder_test.rb
vagrant-aws-mkubenka-0.7.2.pre.9 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-5333e60e2d38/test/unit/plugins/providers/virtualbox/synced_folder_test.rb
vagrant-unbundled-1.9.5.1 test/unit/plugins/providers/virtualbox/synced_folder_test.rb
vagrant-unbundled-1.9.1.1 test/unit/plugins/providers/virtualbox/synced_folder_test.rb
vagrant-compose-yaml-0.1.3 vendor/bundle/ruby/2.2.0/bundler/gems/vagrant-dbb756c7b6da/test/unit/plugins/providers/virtualbox/synced_folder_test.rb
vagrant-compose-yaml-0.1.2 vendor/bundle/ruby/2.2.0/bundler/gems/vagrant-dbb756c7b6da/test/unit/plugins/providers/virtualbox/synced_folder_test.rb
vagrant-compose-yaml-0.1.1 vendor/bundle/ruby/2.2.0/bundler/gems/vagrant-dbb756c7b6da/test/unit/plugins/providers/virtualbox/synced_folder_test.rb
vagrant-compose-yaml-0.1.0 vendor/bundle/ruby/2.2.0/bundler/gems/vagrant-dbb756c7b6da/test/unit/plugins/providers/virtualbox/synced_folder_test.rb
vagrant-unbundled-1.8.5.2 test/unit/plugins/providers/virtualbox/synced_folder_test.rb
vagrant-unbundled-1.8.5.1 test/unit/plugins/providers/virtualbox/synced_folder_test.rb
vagrant-unbundled-1.8.4.2 test/unit/plugins/providers/virtualbox/synced_folder_test.rb
vagrant-unbundled-1.8.4.1 test/unit/plugins/providers/virtualbox/synced_folder_test.rb
vagrant-unbundled-1.8.1.2 test/unit/plugins/providers/virtualbox/synced_folder_test.rb
vagrant-unbundled-1.8.1.1 test/unit/plugins/providers/virtualbox/synced_folder_test.rb
vagrant-cloudstack-1.1.0 vendor/bundle/bundler/gems/vagrant-b421af58e8b3/test/unit/plugins/providers/virtualbox/synced_folder_test.rb
vagrant-cloudstack-1.1.0 vendor/bundle/bundler/gems/vagrant-1cf2a8db4ccb/test/unit/plugins/providers/virtualbox/synced_folder_test.rb
vagrant-cloudstack-1.1.0 vendor/bundle/bundler/gems/vagrant-309e896975d1/test/unit/plugins/providers/virtualbox/synced_folder_test.rb