Sha256: e3a92b4e5f606792a027af6d800f7acd0a0901eb7694e51e1af964f09b8bf755
Contents?: true
Size: 742 Bytes
Versions: 11
Compression:
Stored size: 742 Bytes
Contents
require File.dirname(__FILE__) + '/helper' describe Mercurial::TagFactory do before do @repository = Mercurial::Repository.open(Fixtures.test_repo) end it "should find all tags" do tags = @repository.tags.all tags.size.must_equal 2 tags.map(&:name).sort.must_equal %w(new-tag new-branch-tag).sort tags.map(&:hash_id).sort.must_equal %w(63f70b2314ed bf6386c0a0cc).sort end it "should find tag by name" do tag = @repository.tags.by_name('new-tag') tag.must_be_kind_of(Mercurial::Tag) tag.name.must_equal 'new-tag' tag.hash_id.must_equal 'bf6386c0a0cc' end it "should not find inexistent tag by name" do @repository.tags.by_name('new-tag-shikakabob').must_equal nil end end
Version data entries
11 entries across 11 versions & 1 rubygems