Add tests for using prerelease box versions

This commit is contained in:
Mark Mickan 2016-01-20 10:43:19 +10:30
parent 1378eebea9
commit 31ece8324b
1 changed files with 13 additions and 0 deletions

View File

@ -194,6 +194,19 @@ describe Vagrant::BoxCollection, :skip_windows do
expect(result.version).to eq("1.0")
end
it "handles prerelease versions" do
# Create the "box"
environment.box3("foo", "0.1.0-alpha.1", :virtualbox)
environment.box3("foo", "0.1.0-alpha.2", :virtualbox)
# Actual test
result = subject.find("foo", :virtualbox, ">= 0")
expect(result).to_not be_nil
expect(result).to be_kind_of(box_class)
expect(result.name).to eq("foo")
expect(result.version).to eq("0.1.0-alpha.2")
end
it "returns nil if a box's constraints can't be satisfied" do
# Create the "box"
environment.box3("foo", "0.1", :virtualbox)