Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git_rake_spec.rb « gitlab « tasks « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 63a7f7efe73b0d34569044810596fb4bcb501bac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
require 'rake_helper'

describe 'gitlab:git rake tasks' do
  before do
    Rake.application.rake_require 'tasks/gitlab/git'

    stub_warn_user_is_not_gitlab

    FileUtils.mkdir(Settings.absolute('tmp/tests/default_storage'))
  end

  after do
    FileUtils.rm_rf(Settings.absolute('tmp/tests/default_storage'))
  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')
    end
  end
end