Commit f9780eeeca8872c5438f114d12add81785abf41c
1 parent
38d8d749
Exists in
spb-stable
and in
3 other branches
Fix deprecation in specs
From https://github.com/gitlabhq/gitlabhq/pull/6053
Showing
1 changed file
with
6 additions
and
1 deletions
Show diff stats
spec/tasks/gitlab/backup_rake_spec.rb
... | ... | @@ -5,6 +5,7 @@ describe 'gitlab:app namespace rake task' do |
5 | 5 | before :all do |
6 | 6 | Rake.application.rake_require "tasks/gitlab/task_helpers" |
7 | 7 | Rake.application.rake_require "tasks/gitlab/backup" |
8 | + Rake.application.rake_require "tasks/gitlab/shell" | |
8 | 9 | # empty task as env is already loaded |
9 | 10 | Rake::Task.define_task :environment |
10 | 11 | end |
... | ... | @@ -26,6 +27,9 @@ describe 'gitlab:app namespace rake task' do |
26 | 27 | Dir.stub :chdir |
27 | 28 | File.stub exists?: true |
28 | 29 | Kernel.stub system: true |
30 | + FileUtils.stub cp_r: true | |
31 | + FileUtils.stub mv: true | |
32 | + Rake::Task["gitlab:shell:setup"].stub invoke: true | |
29 | 33 | end |
30 | 34 | |
31 | 35 | let(:gitlab_version) { %x{git rev-parse HEAD}.gsub(/\n/,"") } |
... | ... | @@ -39,7 +43,8 @@ describe 'gitlab:app namespace rake task' do |
39 | 43 | YAML.stub load_file: {gitlab_version: gitlab_version} |
40 | 44 | Rake::Task["gitlab:backup:db:restore"].should_receive :invoke |
41 | 45 | Rake::Task["gitlab:backup:repo:restore"].should_receive :invoke |
42 | - expect { run_rake_task }.to_not raise_error SystemExit | |
46 | + Rake::Task["gitlab:shell:setup"].should_receive :invoke | |
47 | + expect { run_rake_task }.to_not raise_error | |
43 | 48 | end |
44 | 49 | end |
45 | 50 | ... | ... |