diff options
author | James Lopez <james@jameslopez.es> | 2017-12-14 14:53:34 +0100 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2018-01-04 11:22:43 +0100 |
commit | 7721e8dfca9d272376f58dcb03ff277aef0a9c31 (patch) | |
tree | 377b00fe22e030b447ed9c922b65c63f8b056381 /spec | |
parent | 260935868acfb7c0cb720088d4f8c4c1c1088ddb (diff) | |
download | gitlab-ce-7721e8dfca9d272376f58dcb03ff277aef0a9c31.tar.gz |
fix spec
Diffstat (limited to 'spec')
-rw-r--r-- | spec/tasks/gitlab/git_rake_spec.rb | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/spec/tasks/gitlab/git_rake_spec.rb b/spec/tasks/gitlab/git_rake_spec.rb index 63a7f7efe73..60b51186ceb 100644 --- a/spec/tasks/gitlab/git_rake_spec.rb +++ b/spec/tasks/gitlab/git_rake_spec.rb @@ -4,9 +4,11 @@ describe 'gitlab:git rake tasks' do before do 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 after do @@ -14,14 +16,8 @@ describe 'gitlab:git rake tasks' do end describe 'fsck' do - let(:storages) do - { 'default' => { 'path' => Settings.absolute('tmp/tests/default_storage') } } - end - it 'outputs the right git command' do - expect(Kernel).to receive(:system).with('').and_return(true) - - run_rake_task('gitlab:git:fsck') + expect { run_rake_task('gitlab:git:fsck') }.to output(/Performed Checking integrity/).to_stdout end end end |