Sha256: 1ceb7f7dfd5bedf3d9df3417ed78ed597f4ee26090cc6b57cadee1f9d37868e5

Contents?: true

Size: 897 Bytes

Versions: 1

Compression:

Stored size: 897 Bytes

Contents

require 'spec_helper'

describe 'VagrantPlugins::GuestAlpine::Cap::NFSClient' do
  let(:described_class) do
    VagrantPlugins::GuestAlpine::Plugin.components.guest_capabilities[:alpine].get(:nfs_client_install)
  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 install nfs client' do
    communicator.should_receive(:sudo).with('apk update')
    communicator.should_receive(:sudo).with('apk add --upgrade nfs-utils')
    communicator.should_receive(:sudo).with('rc-update add rpc.statd')
    communicator.should_receive(:sudo).with('rc-service rpc.statd start')

    allow_message_expectations_on_nil
    described_class.nfs_client_install(machine)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
vagrant-alpine-0.2.0 spec/cap/nfs_client_spec.rb