From 574f7b3c835580af885f9b244ad7ed74abac62be Mon Sep 17 00:00:00 2001 From: Hegwin Date: Fri, 3 Nov 2023 22:53:51 +0800 Subject: [PATCH] [#186400113] Align with Ruby 3.2 removed methods - File.exists? --- lib/baidu-netdisk/version.rb | 2 +- spec/baidu-netdisk/uploader_spec.rb | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/baidu-netdisk/version.rb b/lib/baidu-netdisk/version.rb index 59660c5..60982cf 100644 --- a/lib/baidu-netdisk/version.rb +++ b/lib/baidu-netdisk/version.rb @@ -1,3 +1,3 @@ module BaiduNetDisk - VERSION = '0.1.0' + VERSION = '0.1.1' end diff --git a/spec/baidu-netdisk/uploader_spec.rb b/spec/baidu-netdisk/uploader_spec.rb index 69cf78d..ac8686b 100644 --- a/spec/baidu-netdisk/uploader_spec.rb +++ b/spec/baidu-netdisk/uploader_spec.rb @@ -140,7 +140,7 @@ def remove_big_file(path) subject.send :prepare subject.send :clear_up - expect(File.exists?(source_path)).to be_truthy + expect(File.exist?(source_path)).to be_truthy end end @@ -156,14 +156,14 @@ def remove_big_file(path) slices = subject.instance_variable_get :@slices slices.each do |slice| - expect(File.exists?(slice[:slice_file_path])).to be_truthy + expect(File.exist?(slice[:slice_file_path])).to be_truthy end subject.send :clear_up - expect(File.exists?(source_path)).to be_truthy + expect(File.exist?(source_path)).to be_truthy slices.each do |slice| - expect(File.exists?(slice[:slice_file_path])).to be_falsey + expect(File.exist?(slice[:slice_file_path])).to be_falsey end end end