Sha256: 3ad9777a2e985b322a7a80268e1bce0602b830ff486369e9649a52d08ad6d64c

Contents?: true

Size: 1.05 KB

Versions: 10

Compression:

Stored size: 1.05 KB

Contents

require_relative "base"

require VagrantPlugins::Parallels.source_root.join('lib/vagrant-parallels/config')

describe VagrantPlugins::Parallels::Config do

  context "defaults" do
    before { subject.finalize! }

    its(:check_guest_tools) { should be_true }
    its(:name) { should be_nil }

    it "should have one Shared adapter" do
      expect(subject.network_adapters).to eql({
        0 => [:shared, {}],
      })
    end
  end

  describe "memory=" do
    it "configures memory size (in Mb)" do
      subject.memory=(1024)
      expect(subject.customizations).to include(["pre-boot", ["set", :id, "--memsize", '1024']])
    end
  end

  describe "cpus=" do
    it "configures count of cpus" do
      subject.cpus=('4')
      expect(subject.customizations).to include(["pre-boot", ["set", :id, "--cpus", 4]])
    end
  end

  describe "#network_adapter" do
    it "configures additional adapters" do
      subject.network_adapter(2, :bridged, auto_config: true)
      expect(subject.network_adapters[2]).to eql(
        [:bridged, auto_config: true])
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
vagrant-parallels-1.0.6 test/unit/config_test.rb
vagrant-parallels-1.0.6.rc1 test/unit/config_test.rb
vagrant-parallels-1.0.5 test/unit/config_test.rb
vagrant-parallels-1.0.4 test/unit/config_test.rb
vagrant-parallels-1.0.3 test/unit/config_test.rb
vagrant-parallels-1.0.2 test/unit/config_test.rb
vagrant-parallels-1.0.1 test/unit/config_test.rb
vagrant-parallels-1.0.0 test/unit/config_test.rb
vagrant-parallels-0.2.2 test/unit/config_test.rb
vagrant-parallels-0.2.2.rc1 test/unit/config_test.rb