ruby-changes:70720
From: Nobuyoshi <ko1@a...>
Date: Tue, 4 Jan 2022 14:59:34 +0900 (JST)
Subject: [ruby-changes:70720] 0bfb406b75 (master): [rubygems/rubygems] Fix the test to use the mock gem path
https://git.ruby-lang.org/ruby.git/commit/?id=0bfb406b75 From 0bfb406b7577e733873f59a108795b59fab3c264 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Tue, 4 Jan 2022 08:37:24 +0900 Subject: [rubygems/rubygems] Fix the test to use the mock gem path "NUL.*" means the NUL device on Windows, as well as mere "NUL", and no data is read. https://github.com/rubygems/rubygems/commit/e2c7d22745 --- spec/bundler/bundler/gem_helper_spec.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/spec/bundler/bundler/gem_helper_spec.rb b/spec/bundler/bundler/gem_helper_spec.rb index 59feb5b8e96..2a6a6310742 100644 --- a/spec/bundler/bundler/gem_helper_spec.rb +++ b/spec/bundler/bundler/gem_helper_spec.rb @@ -170,9 +170,11 @@ RSpec.describe Bundler::GemHelper do https://github.com/ruby/ruby/blob/trunk/spec/bundler/bundler/gem_helper_spec.rb#L170 describe "#build_checksum" do it "calculates SHA512 of the content" do - subject.build_checksum(Pathname(IO::NULL)) - sha_path = app_path.join("checksums", "#{File.basename(IO::NULL)}.sha512") - expect(File.read(sha_path).chomp).to eql(Digest::SHA512.hexdigest("")) + FileUtils.mkdir_p(app_gem_dir) + File.write(app_gem_path, "") + mock_checksum_message app_name, app_version + subject.build_checksum(app_gem_path) + expect(File.read(app_sha_path).chomp).to eql(Digest::SHA512.hexdigest("")) end context "when build was successful" do -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/