Sha256: c0086663cd187566cdf3131df524ab43b68df186298e4768d9f120858357bfec
Contents?: true
Size: 766 Bytes
Versions: 10
Compression:
Stored size: 766 Bytes
Contents
require File.join(File.dirname(__FILE__), '..', '..', 'test_helper') class CommandsSuspendTest < Test::Unit::TestCase setup do @klass = Vagrant::Commands::Suspend @persisted_vm = mock("persisted_vm") @persisted_vm.stubs(:execute!) @env = mock_environment @env.stubs(:require_persisted_vm) @env.stubs(:vm).returns(@persisted_vm) @instance = @klass.new(@env) end context "executing" do setup do @persisted_vm.stubs(:suspend) @persisted_vm.stubs(:saved?).returns(false) end should "require a persisted VM" do @env.expects(:require_persisted_vm).once @instance.execute end should "suspend the VM" do @persisted_vm.expects(:suspend).once @instance.execute end end end
Version data entries
10 entries across 10 versions & 2 rubygems