Skip to content
This repository has been archived by the owner on May 12, 2018. It is now read-only.

Commit

Permalink
Merge 8aadb75 into fda2e54
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Suschlik committed May 14, 2013
2 parents fda2e54 + 8aadb75 commit 76a6d07
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
4 changes: 2 additions & 2 deletions lib/gitlab_git/repository.rb
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def branches

# Returns an Array of tag names
def tag_names
repo.tags.collect(&:name).sort.reverse
tags.map(&:name)
end

# Returns an Array of Tags
Expand All @@ -121,7 +121,7 @@ def tags

# Returns an Array of branch and tag names
def ref_names
[branch_names + tag_names].flatten
branch_names + tag_names
end

def heads
Expand Down
12 changes: 3 additions & 9 deletions spec/repository_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,9 @@
describe :tag_names do
subject { repository.tag_names }

it { should be_kind_of Array }
it { should have(16).elements }
its(:first) { should == "v2.2.0pre" }
it { should include("v1.2.0") }
it { should_not include("v5.0.0") }
end
Expand Down Expand Up @@ -184,17 +186,9 @@

it { should be_kind_of Array }
its(:first) { should == '2_3_notes_fix' }
its(:last) { should == 'v0.9.4' }
end

describe :tag_names do
let(:tag_names) { repository.tag_names }
subject { tag_names }

it { should be_kind_of Array }
its(:first) { should == 'v2.2.0pre' }
end


describe :last_commit_for do
context 'no path' do
subject { repository.last_commit_for('master') }
Expand Down

0 comments on commit 76a6d07

Please sign in to comment.