Add test for php version in URL middle

This commit is contained in:
Kevin Abel 2017-10-03 23:39:14 -05:00
parent 9d36096d68
commit 4f55565677

View File

@ -649,6 +649,11 @@ describe Version do
.to be_detected_from("ftp://gcc.gnu.org/pub/gcc/snapshots/6-20151227/gcc-6-20151227.tar.bz2") .to be_detected_from("ftp://gcc.gnu.org/pub/gcc/snapshots/6-20151227/gcc-6-20151227.tar.bz2")
end end
specify "semver in middle of URL" do
expect(Version.create("7.1.10"))
.to be_detected_from("https://php.net/get/php-7.1.10.tar.gz/from/this/mirror")
end
specify "from URL" do specify "from URL" do
expect(Version.create("1.2.3")) expect(Version.create("1.2.3"))
.to be_detected_from("http://github.com/foo/bar.git", tag: "v1.2.3") .to be_detected_from("http://github.com/foo/bar.git", tag: "v1.2.3")