Sha256: 9fa916b4ab90e46c28e355f17ec7d80be67cdda291838da28a60ad9b92fa5824
Contents?: true
Size: 1.03 KB
Versions: 32
Compression:
Stored size: 1.03 KB
Contents
require_relative "../../../../base" describe "VagrantPlugins::GuestFreeBSD::Cap::RSync" do let(:caps) do VagrantPlugins::GuestFreeBSD::Plugin .components .guest_capabilities[:freebsd] 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 let(:cap) { caps.get(:rsync_install) } it "installs rsync" do comm.expect_command("pkg install -y rsync") cap.rsync_install(machine) end end describe ".rsync_installed" do let(:cap) { caps.get(:rsync_installed) } it "checks if rsync is installed" do comm.expect_command("which rsync") cap.rsync_installed(machine) end end describe ".rsync_command" do let(:cap) { caps.get(:rsync_command) } it "defaults to 'sudo rsync'" do expect(cap.rsync_command(machine)).to eq("sudo rsync") end end end
Version data entries
32 entries across 28 versions & 6 rubygems