summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2017-12-14 14:53:34 +0100
committerJames Lopez <james@jameslopez.es>2018-01-04 11:22:43 +0100
commit7721e8dfca9d272376f58dcb03ff277aef0a9c31 (patch)
tree377b00fe22e030b447ed9c922b65c63f8b056381
parent260935868acfb7c0cb720088d4f8c4c1c1088ddb (diff)
downloadgitlab-ce-7721e8dfca9d272376f58dcb03ff277aef0a9c31.tar.gz
fix spec
-rw-r--r--spec/tasks/gitlab/git_rake_spec.rb14
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