diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-04-21 15:13:40 +0200 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-04-24 12:29:36 +0200 |
commit | 8ed7ac9d443563a62a6aa03a2ec72b9fcb0d2df1 (patch) | |
tree | b787add194486ac4346c2de2874b32db6d37c635 /spec/helpers | |
parent | 84a1590252c63c710bceaa7a394799cdc5109505 (diff) | |
download | gitlab-ce-8ed7ac9d443563a62a6aa03a2ec72b9fcb0d2df1.tar.gz |
Use project.commit convenience method.
Diffstat (limited to 'spec/helpers')
-rw-r--r-- | spec/helpers/diff_helper_spec.rb | 2 | ||||
-rw-r--r-- | spec/helpers/gitlab_markdown_helper_spec.rb | 2 | ||||
-rw-r--r-- | spec/helpers/tree_helper_spec.rb | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/spec/helpers/diff_helper_spec.rb b/spec/helpers/diff_helper_spec.rb index 5bd09793b11..95719b4b49f 100644 --- a/spec/helpers/diff_helper_spec.rb +++ b/spec/helpers/diff_helper_spec.rb @@ -4,7 +4,7 @@ describe DiffHelper do include RepoHelpers let(:project) { create(:project) } - let(:commit) { project.repository.commit(sample_commit.id) } + let(:commit) { project.commit(sample_commit.id) } let(:diff) { commit.diffs.first } let(:diff_file) { Gitlab::Diff::File.new(diff) } diff --git a/spec/helpers/gitlab_markdown_helper_spec.rb b/spec/helpers/gitlab_markdown_helper_spec.rb index 64f130e4ae4..e309dbb6a2f 100644 --- a/spec/helpers/gitlab_markdown_helper_spec.rb +++ b/spec/helpers/gitlab_markdown_helper_spec.rb @@ -6,7 +6,7 @@ describe GitlabMarkdownHelper do let!(:project) { create(:project) } let(:user) { create(:user, username: 'gfm') } - let(:commit) { project.repository.commit } + let(:commit) { project.commit } let(:issue) { create(:issue, project: project) } let(:merge_request) { create(:merge_request, source_project: project, target_project: project) } let(:snippet) { create(:project_snippet, project: project) } diff --git a/spec/helpers/tree_helper_spec.rb b/spec/helpers/tree_helper_spec.rb index 8271e00f41b..2013b3e4c2a 100644 --- a/spec/helpers/tree_helper_spec.rb +++ b/spec/helpers/tree_helper_spec.rb @@ -6,7 +6,7 @@ describe TreeHelper do before { @repository = project.repository - @commit = project.repository.commit("e56497bb") + @commit = project.commit("e56497bb") } context "on a directory containing more than one file/directory" do |