Sha256: 2890ca631bd94be46f3d512b53faaf897334640884b9e6502b745ea2b372d008

Contents?: true

Size: 633 Bytes

Versions: 3

Compression:

Stored size: 633 Bytes

Contents

require 'spec_helper'

describe 'VagrantPlugins::GuestAlpine::Cap::Halt' do
  let(:described_class) do
    VagrantPlugins::GuestAlpine::Plugin.components.guest_capabilities[:alpine].get(:halt)
  end
  let(:machine) { double('machine') }
  let(:communicator) { VagrantTests::DummyCommunicator::Communicator.new(machine) }

  before do
    allow(machine).to receive(:communicate).and_return(communicator)
  end

  after do
    communicator.verify_expectations!
  end

  it 'should halt guest' do
    communicator.should_receive(:sudo).with('poweroff')
    allow_message_expectations_on_nil
    described_class.halt(machine)
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
vagrant-alpine-0.2.0 spec/cap/halt_spec.rb
vagrant-alpine-0.1.3 spec/cap/halt_spec.rb
vagrant-alpine-0.1.1 spec/cap/halt_spec.rb