Sha256: 1e42f313ce831f24ba1e7a18a370e64d283e46c617872021f1ee7594be9256a5
Contents?: true
Size: 1.23 KB
Versions: 14
Compression:
Stored size: 1.23 KB
Contents
# -*- ruby -*- require 'spec_helper' describe "Pkg::Util::Git_tag" do context "parse_ref!" do it "fails for a ref that doesn't exist'" do expect { Pkg::Util::Git_tag.new("git://github.com/puppetlabs/leatherman.git", "garbagegarbage") }.to raise_error(RuntimeError, /ERROR : Not a ref or sha!/) end end context "sha?" do it "sets ref type as a sha when passed a sha" do git_tag = Pkg::Util::Git_tag.new("git://github.com/puppetlabs/leatherman.git", "4eef05389ebf418b62af17406c7f9f13fa51f975") expect(git_tag.sha?).to eq(true) end end context "branch?" do it "sets ref type as a branch when passed a branch" do git_tag = Pkg::Util::Git_tag.new("git://github.com/puppetlabs/leatherman.git", "main") expect(git_tag.branch?).to eq(true) end end context "tag?" do it "sets ref type as a tag when passed a tag" do git_tag = Pkg::Util::Git_tag.new("git://github.com/puppetlabs/leatherman.git", "tags/0.6.2") expect(git_tag.tag?).to eq(true) end it "sets ref type as a tag when passed a fully qualified tag" do git_tag = Pkg::Util::Git_tag.new("git://github.com/puppetlabs/leatherman.git", "refs/tags/0.6.2") expect(git_tag.tag?).to eq(true) end end end
Version data entries
14 entries across 14 versions & 1 rubygems