Include test coverage on provider option deprecation

This commit is contained in:
Chris Roberts 2018-05-29 10:25:48 -07:00
parent 12194cba5a
commit 1becae50a5
1 changed files with 9 additions and 1 deletions

View File

@ -4,7 +4,8 @@ require Vagrant.source_root.join("plugins/providers/hyperv/config")
describe VagrantPlugins::HyperV::Config do
let(:machine){ double("machine") }
let(:machine){ double("machine", ui: ui) }
let(:ui){ double("ui") }
describe "#ip_address_timeout" do
it "can be set" do
@ -92,6 +93,13 @@ describe VagrantPlugins::HyperV::Config do
expect(subject.differencing_disk).to eq(true)
expect(subject.linked_clone).to eq(true)
end
it "should provide a deprecation warning when set" do
expect(ui).to receive(:warn)
subject.differencing_disk = true
subject.finalize!
subject.validate(machine)
end
end
describe "#linked_clone" do