Dont init repo on every create(:repo)

This commit is contained in:
Dmitriy Zaporozhets 2013-04-01 17:27:44 +03:00
parent 541d899410
commit 9a26e9a0d6
7 changed files with 18 additions and 11 deletions

View file

@ -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

View file

@ -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