From 48cbf4ea37dd9b86282857dbeb883db0ce5f445d Mon Sep 17 00:00:00 2001 From: Vipul A M Date: Sat, 20 Apr 2024 01:17:34 +0530 Subject: [PATCH] Fix Rubocop on violation Style/MapIntoArray, introduced by Ruby 3.3.x latest verions of rubocop --- spec/uploadcare/entity/decorator/paginator_spec.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/spec/uploadcare/entity/decorator/paginator_spec.rb b/spec/uploadcare/entity/decorator/paginator_spec.rb index ca30cff..fe75bb2 100644 --- a/spec/uploadcare/entity/decorator/paginator_spec.rb +++ b/spec/uploadcare/entity/decorator/paginator_spec.rb @@ -55,9 +55,8 @@ module Decorator it 'iterates each file in list' do VCR.use_cassette('rest_file_list_each') do fl_with_params = FileList.file_list(limit: 2) - entities = [] - fl_with_params.each do |file| - entities << file + entities = fl_with_params.map do |file| + file end expect(entities.length).to eq fl_with_params.total end