diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-04-03 11:06:31 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-04-03 11:06:31 +0400 |
commit | 413a310faa17f626f351fa3afd6423e8782935a9 (patch) | |
tree | 290a418a9750d66fd43282b0a51157abb4eef7a2 /spec | |
parent | 7e8bf92bd77f5a63802c87bfbb6282a17a43c691 (diff) |
fixed blame and mr factory
Diffstat (limited to 'spec')
-rw-r--r-- | spec/factories.rb | 8 | ||||
-rw-r--r-- | spec/lib/git/commit_spec.rb | 2 | ||||
-rw-r--r-- | spec/support/matchers.rb | 2 |
3 files changed, 8 insertions, 4 deletions
diff --git a/spec/factories.rb b/spec/factories.rb index 3205cabd150..9859fbf69c5 100644 --- a/spec/factories.rb +++ b/spec/factories.rb @@ -86,9 +86,11 @@ FactoryGirl.define do target_branch "master" # pretend bcf03b5d~3 source_branch "stable" # pretend bcf03b5d st_commits do - [Commit.new(project.repository.commit('bcf03b5d')), - Commit.new(project.repository.commit('bcf03b5d~1')), - Commit.new(project.repository.commit('bcf03b5d~2'))] + [ + project.repository.commit('bcf03b5d').to_hash, + project.repository.commit('bcf03b5d~1').to_hash, + project.repository.commit('bcf03b5d~2').to_hash + ] end st_diffs do project.repo.diff("bcf03b5d~3", "bcf03b5d") diff --git a/spec/lib/git/commit_spec.rb b/spec/lib/git/commit_spec.rb index 475bc359a18..5f3297eea17 100644 --- a/spec/lib/git/commit_spec.rb +++ b/spec/lib/git/commit_spec.rb @@ -20,6 +20,8 @@ describe Gitlab::Git::Commit do author: @author, committer: @committer, committed_date: Date.yesterday, + authored_date: Date.yesterday, + parents: [], message: 'Refactoring specs' ) diff --git a/spec/support/matchers.rb b/spec/support/matchers.rb index 29d16ecbac7..15fb47004e9 100644 --- a/spec/support/matchers.rb +++ b/spec/support/matchers.rb @@ -3,7 +3,7 @@ RSpec::Matchers.define :be_valid_commit do actual != nil actual.id == ValidCommit::ID actual.message == ValidCommit::MESSAGE - actual.author.name == ValidCommit::AUTHOR_FULL_NAME + actual.author_name == ValidCommit::AUTHOR_FULL_NAME end end |