summaryrefslogtreecommitdiff
path: root/spec/tasks/gitlab/backup_rake_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/tasks/gitlab/backup_rake_spec.rb')
-rw-r--r--spec/tasks/gitlab/backup_rake_spec.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/tasks/gitlab/backup_rake_spec.rb b/spec/tasks/gitlab/backup_rake_spec.rb
index 71a45eb2fa6..60942cc95fc 100644
--- a/spec/tasks/gitlab/backup_rake_spec.rb
+++ b/spec/tasks/gitlab/backup_rake_spec.rb
@@ -13,7 +13,7 @@ describe 'gitlab:app namespace rake task' do
describe 'backup_restore' do
before do
# avoid writing task output to spec progress
- $stdout.stub :write
+ allow($stdout).to receive :write
end
let :run_rake_task do
@@ -24,7 +24,7 @@ describe 'gitlab:app namespace rake task' do
context 'gitlab version' do
before do
Dir.stub glob: []
- Dir.stub :chdir
+ allow(Dir).to receive :chdir
File.stub exists?: true
Kernel.stub system: true
FileUtils.stub cp_r: true
@@ -41,9 +41,9 @@ describe 'gitlab:app namespace rake task' do
it 'should invoke restoration on mach' do
YAML.stub load_file: {gitlab_version: gitlab_version}
- Rake::Task["gitlab:backup:db:restore"].should_receive :invoke
- Rake::Task["gitlab:backup:repo:restore"].should_receive :invoke
- Rake::Task["gitlab:shell:setup"].should_receive :invoke
+ expect(Rake::Task["gitlab:backup:db:restore"]).to receive :invoke
+ expect(Rake::Task["gitlab:backup:repo:restore"]).to receive :invoke
+ expect(Rake::Task["gitlab:shell:setup"]).to receive :invoke
expect { run_rake_task }.to_not raise_error
end
end