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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/lib/gitlab/import_export/avatar_restorer_spec.rb')
-rw-r--r--spec/lib/gitlab/import_export/avatar_restorer_spec.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/spec/lib/gitlab/import_export/avatar_restorer_spec.rb b/spec/lib/gitlab/import_export/avatar_restorer_spec.rb
index 77f551eeca1..662e1a5eaab 100644
--- a/spec/lib/gitlab/import_export/avatar_restorer_spec.rb
+++ b/spec/lib/gitlab/import_export/avatar_restorer_spec.rb
@@ -14,8 +14,9 @@ describe Gitlab::ImportExport::AvatarRestorer do
context 'with avatar' do
before do
- allow_any_instance_of(described_class).to receive(:avatar_export_file)
- .and_return(uploaded_image_temp_path)
+ allow_next_instance_of(described_class) do |instance|
+ allow(instance).to receive(:avatar_export_file).and_return(uploaded_image_temp_path)
+ end
end
it 'restores a project avatar' do
@@ -33,8 +34,9 @@ describe Gitlab::ImportExport::AvatarRestorer do
Dir.mktmpdir do |tmpdir|
FileUtils.mkdir_p("#{tmpdir}/a/b")
- allow_any_instance_of(described_class).to receive(:avatar_export_path)
- .and_return("#{tmpdir}/a")
+ allow_next_instance_of(described_class) do |instance|
+ allow(instance).to receive(:avatar_export_path).and_return("#{tmpdir}/a")
+ end
expect(described_class.new(project: project, shared: shared).restore).to be true
end