Commit 95ca6584 authored by Robert Speicher's avatar Robert Speicher

Add CommitRange directly to results Hash

parent 92c681a5
......@@ -56,7 +56,7 @@ module Gitlab
range =, project)
if range.valid_commits?
push_result(:commit_range, range.to_a)
push_result(:commit_range, range)
url = url_for_commit_range(project, range)
......@@ -65,12 +65,12 @@ describe Gitlab::ReferenceExtractor do
earlier_commit = project.commit('master~2')
subject.analyze("this references commits #{earlier_commit.sha[0..6]}...#{commit.sha[0..6]}")
extracted = subject.commit_ranges
expect(extracted.size).to eq(1)
expect(extracted[0][0].sha).to eq(earlier_commit.sha)
expect(extracted[0][0].message).to eq(earlier_commit.message)
expect(extracted[0][1].sha).to eq(commit.sha)
expect(extracted[0][1].message).to eq(commit.message)
expect(extracted.first).to be_kind_of(CommitRange)
expect(extracted.first.commit_from).to eq earlier_commit
expect(extracted.first.commit_to).to eq commit
context 'with a project with an underscore' do
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment