diff options
Diffstat (limited to 'spec/lib/backup/repository_spec.rb')
-rw-r--r-- | spec/lib/backup/repository_spec.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/spec/lib/backup/repository_spec.rb b/spec/lib/backup/repository_spec.rb index 5f120f258cd..82ae535e100 100644 --- a/spec/lib/backup/repository_spec.rb +++ b/spec/lib/backup/repository_spec.rb @@ -12,7 +12,9 @@ describe Backup::Repository do allow(progress).to receive(:print) allow(FileUtils).to receive(:mv).and_return(true) - allow_any_instance_of(described_class).to receive(:progress).and_return(progress) + allow_next_instance_of(described_class) do |instance| + allow(instance).to receive(:progress).and_return(progress) + end end describe '#dump' do @@ -47,7 +49,9 @@ describe Backup::Repository do describe 'command failure' do before do - allow_any_instance_of(Gitlab::Shell).to receive(:create_repository).and_return(false) + allow_next_instance_of(Gitlab::Shell) do |instance| + allow(instance).to receive(:create_repository).and_return(false) + end end context 'hashed storage' do |