Include updated unit tests for disk ext update
This commit is contained in:
parent
c5f4534487
commit
c179b2fb22
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user