Sha256: e6be74aa8165455ab78e4ceeb3257b9eb01caf91cbe12c5b1218eba13999fad4
Contents?: true
Size: 802 Bytes
Versions: 8
Compression:
Stored size: 802 Bytes
Contents
require_relative "../../../../base" describe "VagrantPlugins::GuestLinux::Cap::Halt" do let(:caps) do VagrantPlugins::GuestLinux::Plugin .components .guest_capabilities[:linux] 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 ".halt" do let(:cap) { caps.get(:halt) } it "runs the shutdown command" do comm.expect_command("shutdown -h now") cap.halt(machine) end it "does not raise an IOError" do comm.stub_command("shutdown -h now", raise: IOError) expect { cap.halt(machine) }.to_not raise_error end end end
Version data entries
8 entries across 8 versions & 2 rubygems