diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-04-01 17:27:44 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-04-01 17:27:44 +0300 |
commit | 9a26e9a0d634c8bb796f0b08f6397d1e343bd4be (patch) | |
tree | 83ab649038540b07074cf34ce94eedc21386b84f /spec/models | |
parent | 541d89941014137762dff696c83b3357eba8efeb (diff) | |
download | gitlab-ce-9a26e9a0d634c8bb796f0b08f6397d1e343bd4be.tar.gz |
Dont init repo on every create(:repo)
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/commit_spec.rb | 2 | ||||
-rw-r--r-- | spec/models/gollum_wiki_spec.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/spec/models/commit_spec.rb b/spec/models/commit_spec.rb index 7713a33da07..6cf777bec04 100644 --- a/spec/models/commit_spec.rb +++ b/spec/models/commit_spec.rb @@ -1,7 +1,7 @@ require 'spec_helper' describe Commit do - let(:commit) { create(:project).repository.commit } + let(:commit) { create(:project_with_code).repository.commit } describe '#title' do diff --git a/spec/models/gollum_wiki_spec.rb b/spec/models/gollum_wiki_spec.rb index 87601683275..aa850dfd0a3 100644 --- a/spec/models/gollum_wiki_spec.rb +++ b/spec/models/gollum_wiki_spec.rb @@ -81,7 +81,7 @@ describe GollumWiki do end it "raises CouldNotCreateWikiError if it can't create the wiki repository" do - Gitlab::Shell.any_instance.stub(:add_repository).and_return(false) + GollumWiki.any_instance.stub(:init_repo).and_return(false) expect { GollumWiki.new(project, user).wiki }.to raise_exception(GollumWiki::CouldNotCreateWikiError) end end |