Include updated unit tests for disk ext update

This commit is contained in:
Brian Cain 2020-02-12 13:51:59 -08:00
parent c5f4534487
commit c179b2fb22
No known key found for this signature in database
GPG Key ID: 9FC4639B2E4510A0
2 changed files with 10 additions and 2 deletions

View File

@ -9,7 +9,9 @@ describe VagrantPlugins::Kernel_V2::VagrantConfigDisk do
subject { described_class.new(type) }
let(:machine) { double("machine") }
let(:provider) { double("provider") }
let(:machine) { double("machine", provider: provider) }
def assert_invalid
errors = subject.validate(machine)
@ -30,6 +32,8 @@ describe VagrantPlugins::Kernel_V2::VagrantConfigDisk do
subject.name = "foo"
subject.size = 100
allow(provider).to receive(:capability?).with(:validate_disk_ext).and_return(true)
allow(provider).to receive(:capability).with(:validate_disk_ext, "vdi").and_return(true)
end
describe "with defaults" do

View File

@ -7,7 +7,8 @@ describe VagrantPlugins::Kernel_V2::VMConfig do
subject { described_class.new }
let(:machine) { double("machine") }
let(:provider) { double("provider") }
let(:machine) { double("machine", provider: provider) }
def assert_invalid
errors = subject.validate(machine)
@ -37,6 +38,9 @@ describe VagrantPlugins::Kernel_V2::VMConfig do
allow(machine).to receive(:provider_config).and_return(nil)
allow(machine).to receive(:provider_options).and_return({})
allow(provider).to receive(:capability?).with(:validate_disk_ext).and_return(true)
allow(provider).to receive(:capability).with(:validate_disk_ext, "vdi").and_return(true)
subject.box = "foo"
end