Skip to content

Commit

Permalink
Only configure when a package is installed
Browse files Browse the repository at this point in the history
  • Loading branch information
hartmantis committed Jul 29, 2015
1 parent 5ec5e36 commit b77e5cb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion libraries/provider_vmware_fusion.rb
Expand Up @@ -51,6 +51,7 @@ def whyrun_supported?
action :install do
vmware_fusion_app new_resource.name do
action :install
notifies :configure, "vmware_fusion_config[#{new_resource.name}]"
end
end

Expand All @@ -60,7 +61,7 @@ def whyrun_supported?
action :configure do
vmware_fusion_config new_resource.name do
license new_resource.license
action :configure
action :nothing
end
end

Expand Down
6 changes: 4 additions & 2 deletions spec/libraries/provider_vmware_fusion_spec.rb
Expand Up @@ -40,6 +40,8 @@
p = provider
expect(p).to receive(:vmware_fusion_app).with(name).and_yield
expect(p).to receive(:action).with(:install)
expect(p).to receive(:notifies).with(:configure,
'vmware_fusion_config[default]')
p.action_install
end
end
Expand All @@ -53,11 +55,11 @@
end

shared_examples_for 'any resource' do
it 'uses a vmware_fusion_config to configure VMF' do
it 'uses a vmware_fusion_config resourceF' do
p = provider
expect(p).to receive(:vmware_fusion_config).with(name).and_yield
expect(p).to receive(:license).with(license)
expect(p).to receive(:action).with(:configure)
expect(p).to receive(:action).with(:nothing)
p.action_configure
end
end
Expand Down

0 comments on commit b77e5cb

Please sign in to comment.