Sha256: 879727c1c1bc0f00b584d12924ed96992e003f147f906744ee085cb08bc13705

Contents?: true

Size: 766 Bytes

Versions: 8

Compression:

Stored size: 766 Bytes

Contents

require_relative "../../../../base"

describe "VagrantPlugins::VagrantPlugins::Cap::Halt" do
  let(:plugin) { VagrantPlugins::GuestSmartos::Plugin.components.guest_capabilities[:smartos].get(:halt) }
  let(:machine) { double("machine") }
  let(:config) { double("config", smartos: VagrantPlugins::GuestSmartos::Config.new) }
  let(:communicator) { VagrantTests::DummyCommunicator::Communicator.new(machine) }

  before do
    machine.stub(:communicate).and_return(communicator)
    machine.stub(:config).and_return(config)
  end

  after do
    communicator.verify_expectations!
  end

  describe ".halt" do
    it "sends a shutdown signal" do
      communicator.expect_command(%Q(pfexec /usr/sbin/shutdown -y -i5 -g0))
      plugin.halt(machine)
    end
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
vagrant-compose-yaml-0.1.3 vendor/bundle/ruby/2.2.0/bundler/gems/vagrant-dbb756c7b6da/test/unit/plugins/guests/smartos/cap/halt_test.rb
vagrant-compose-yaml-0.1.2 vendor/bundle/ruby/2.2.0/bundler/gems/vagrant-dbb756c7b6da/test/unit/plugins/guests/smartos/cap/halt_test.rb
vagrant-compose-yaml-0.1.1 vendor/bundle/ruby/2.2.0/bundler/gems/vagrant-dbb756c7b6da/test/unit/plugins/guests/smartos/cap/halt_test.rb
vagrant-compose-yaml-0.1.0 vendor/bundle/ruby/2.2.0/bundler/gems/vagrant-dbb756c7b6da/test/unit/plugins/guests/smartos/cap/halt_test.rb
vagrant-unbundled-1.8.5.2 test/unit/plugins/guests/smartos/cap/halt_test.rb
vagrant-unbundled-1.8.5.1 test/unit/plugins/guests/smartos/cap/halt_test.rb
vagrant-unbundled-1.8.4.2 test/unit/plugins/guests/smartos/cap/halt_test.rb
vagrant-unbundled-1.8.4.1 test/unit/plugins/guests/smartos/cap/halt_test.rb