2016-06-05 01:31:41 +00:00
|
|
|
require_relative "../../../../base"
|
|
|
|
|
|
|
|
describe "VagrantPlugins::GuestDebian::Cap:RSync" do
|
|
|
|
let(:described_class) do
|
|
|
|
VagrantPlugins::GuestDebian::Plugin
|
|
|
|
.components
|
|
|
|
.guest_capabilities[:debian]
|
|
|
|
.get(:rsync_install)
|
|
|
|
end
|
|
|
|
|
|
|
|
let(:machine) { double("machine") }
|
|
|
|
let(:comm) { VagrantTests::DummyCommunicator::Communicator.new(machine) }
|
|
|
|
|
|
|
|
before do
|
|
|
|
allow(machine).to receive(:communicate).and_return(comm)
|
|
|
|
end
|
|
|
|
|
|
|
|
after do
|
|
|
|
comm.verify_expectations!
|
|
|
|
end
|
|
|
|
|
|
|
|
describe ".rsync_install" do
|
2016-07-19 01:31:25 +00:00
|
|
|
it "installs rsync" do
|
2016-06-05 01:31:41 +00:00
|
|
|
described_class.rsync_install(machine)
|
|
|
|
|
2016-07-19 01:31:25 +00:00
|
|
|
expect(comm.received_commands[0]).to match(/apt-get -yqq update/)
|
|
|
|
expect(comm.received_commands[0]).to match(/apt-get -yqq install rsync/)
|
2016-06-05 01:31:41 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|