Commit 7721e8df authored by James Lopez's avatar James Lopez

fix spec

parent 26093586
...@@ -4,9 +4,11 @@ describe 'gitlab:git rake tasks' do ...@@ -4,9 +4,11 @@ describe 'gitlab:git rake tasks' do
before do before do
Rake.application.rake_require 'tasks/gitlab/git' Rake.application.rake_require 'tasks/gitlab/git'
stub_warn_user_is_not_gitlab storages = { 'default' => { 'path' => Settings.absolute('tmp/tests/default_storage') } }
FileUtils.mkdir(Settings.absolute('tmp/tests/default_storage')) FileUtils.mkdir_p(Settings.absolute('tmp/tests/default_storage/repo/test.git'))
allow(Gitlab.config.repositories).to receive(:storages).and_return(storages)
stub_warn_user_is_not_gitlab
end end
after do after do
...@@ -14,14 +16,8 @@ describe 'gitlab:git rake tasks' do ...@@ -14,14 +16,8 @@ describe 'gitlab:git rake tasks' do
end end
describe 'fsck' do describe 'fsck' do
let(:storages) do
{ 'default' => { 'path' => Settings.absolute('tmp/tests/default_storage') } }
end
it 'outputs the right git command' do it 'outputs the right git command' do
expect(Kernel).to receive(:system).with('').and_return(true) expect { run_rake_task('gitlab:git:fsck') }.to output(/Performed Checking integrity/).to_stdout
run_rake_task('gitlab:git:fsck')
end end
end end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment