spec/action/stop_server_spec.rb in vagrant-notify-0.2.2 vs spec/action/stop_server_spec.rb in vagrant-notify-0.3.0
- old
+ new
@@ -1,13 +1,15 @@
require 'spec_helper'
require 'vagrant-notify/action/stop_server'
describe Vagrant::Notify::Action::StopServer do
- let(:app) { lambda { |env| } }
- let(:env) { {notify_data: {pid: pid, port: 1234}} }
- let(:pid) { '42' }
- let(:port) { described_class::PORT }
+ let(:app) { lambda { |env| } }
+ let(:communicator) { mock(sudo: true) }
+ let(:machine) { mock(communicate: communicator) }
+ let(:env) { {notify_data: {pid: pid, port: 1234}, machine: machine} }
+ let(:pid) { '42' }
+ let(:port) { described_class::PORT }
subject { described_class.new(app, env) }
before do
Process.stub(kill: true)