Sha256: d8bb6067e5ddb780c3f43167bcebc95216b47ec13a8dadfd8e3ec9609b37f98c

Contents?: true

Size: 873 Bytes

Versions: 6

Compression:

Stored size: 873 Bytes

Contents

require_relative '../base'

describe VagrantPlugins::Parallels::Driver::PD_9 do
  include_context 'parallels'

  subject { VagrantPlugins::Parallels::Driver::Meta.new(uuid) }

  it_behaves_like 'parallels desktop driver'

  describe 'set_power_consumption_mode' do
    it "turns 'longer-battery-life' on" do
      subprocess.should_receive(:execute).
        with('prlctl', 'set', uuid, '--longer-battery-life', 'on',
             an_instance_of(Hash)).
        and_return(subprocess_result(exit_code: 0))

      subject.set_power_consumption_mode(true)
    end

    it "turns 'longer-battery-life' off" do
      subprocess.should_receive(:execute).
        with('prlctl', 'set', uuid, '--longer-battery-life', 'off',
             an_instance_of(Hash)).
        and_return(subprocess_result(exit_code: 0))

      subject.set_power_consumption_mode(false)
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
vagrant-parallels-1.6.2 test/unit/driver/pd_9_test.rb
vagrant-parallels-1.6.1 test/unit/driver/pd_9_test.rb
vagrant-parallels-1.6.0 test/unit/driver/pd_9_test.rb
vagrant-parallels-1.5.1 test/unit/driver/pd_9_test.rb
vagrant-parallels-1.5.0 test/unit/driver/pd_9_test.rb
vagrant-parallels-1.4.3 test/unit/driver/pd_9_test.rb