Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions spec/unit/type/service_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ def logonaccount_insync?(current) end
end

it "should ask the provider whether it is enabled" do
allow(@service.provider.class).to receive(:supports_parameter?).and_return(true)
skip "unsupported by host environment" unless @service.provider.class.supports_parameter?(:enable)
expect(@service.provider).to receive(:enabled?).and_return(:yepper)
@service[:enable] = true
expect(@service.property(:enable).retrieve).to eq(:yepper)
Expand All @@ -362,14 +362,14 @@ def logonaccount_insync?(current) end
end

it "should enable the service if it is supposed to be enabled" do
allow(@service.provider.class).to receive(:supports_parameter?).and_return(true)
skip "unsupported by host environment" unless @service.provider.class.supports_parameter?(:enable)
@service[:enable] = true
expect(@service.provider).to receive(:enable)
@service.property(:enable).sync
end

it "should disable the service if it is supposed to be disabled" do
allow(@service.provider.class).to receive(:supports_parameter?).and_return(true)
skip "unsupported by host environment" unless @service.provider.class.supports_parameter?(:enable)
@service[:enable] = false
expect(@service.provider).to receive(:disable)
@service.property(:enable).sync
Expand Down