spec/vagrant-conoha/action/provision_spec.rb in vagrant-conoha-0.1.5 vs spec/vagrant-conoha/action/provision_spec.rb in vagrant-conoha-0.1.6

- old
+ new

@@ -15,31 +15,22 @@ def initialize(config) @config = config end end -# -# Monkeypatch the VagrantPlugins::Shell module -# to enabled using an FakeShellProvisioner in -# place of a the real shell provisioner class -# -module VagrantPlugins - module Shell - Provisioner = FakeShellProvisioner - end -end - describe VagrantPlugins::ConoHa::Action::ProvisionWrapper do let(:app) do double end let(:internal_provision_wrapper) do double end before :each do + # Stub lookup for provisioners and return a hash containing the test mock. + allow(Vagrant.plugin('2').manager).to receive(:provisioners).and_return(shell: FakeShellProvisioner) @action = ProvisionWrapper.new(app, nil) end describe 'execute' do it 'call InternalProvisionWrapper and conitnue the middleware chain' do @@ -55,9 +46,11 @@ let(:env) do {} end before :each do + # Stub lookup for provisioners and return a hash containing the test mock. + allow(Vagrant.plugin('2').manager).to receive(:provisioners).and_return(shell: FakeShellProvisioner) @action = InternalProvisionWrapper.new(nil, env) end describe 'run_provisioner' do context 'when running a shell provisioner' do