Sha256: 5e1c825778c59052f7187b135fdb70cb49a72de3f30ea2431e5bff26daf577e1
Contents?: true
Size: 664 Bytes
Versions: 16
Compression:
Stored size: 664 Bytes
Contents
require File.join(File.dirname(__FILE__), '..', '..', '..', 'test_helper') class SuspendActionTest < Test::Unit::TestCase setup do @runner, @vm, @action = mock_action(Vagrant::Actions::VM::Suspend) end context "executing" do setup do @vm.stubs(:running?).returns(true) end should "save the state of the VM" do @vm.expects(:save_state).once @action.execute! end should "raise an ActionException if the VM is not running" do @vm.expects(:running?).returns(false) @vm.expects(:save_state).never assert_raises(Vagrant::Actions::ActionException) { @action.execute! } end end end
Version data entries
16 entries across 16 versions & 2 rubygems