From c17ab1eea048105c256a115f4127802b5c283fcc Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Mon, 18 Nov 2024 18:18:23 +0900 Subject: [PATCH] Fixed required path with example location --- spec/bundled_gems_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/bundled_gems_spec.rb b/spec/bundled_gems_spec.rb index 8062ccf1bc..22a35dd498 100644 --- a/spec/bundled_gems_spec.rb +++ b/spec/bundled_gems_spec.rb @@ -247,7 +247,7 @@ RSpec.describe "bundled_gems.rb" do build_lib "childprocess", "5.0.0" do |s| # bootsnap expand required feature to full path # require 'logger' - rubylibpath = File.expand_path(File.join(__dir__, "..", "..", "lib")) + rubylibpath = File.expand_path(File.join(__dir__, "..", "lib")) s.write "lib/childprocess.rb", "require '#{rubylibpath}/logger'" end @@ -274,7 +274,7 @@ RSpec.describe "bundled_gems.rb" do end it "Show warning with zeitwerk" do - libpath = Dir[File.expand_path(File.join(__dir__, "..", "..", ".bundle", "gems/{zeitwerk}-*/lib"))].map(&:to_s).first + libpath = Dir[File.expand_path("../.bundle/gems/{zeitwerk}-*/lib", __dir__)].map(&:to_s).first code = <<-RUBY $LOAD_PATH.unshift("#{libpath}") require "zeitwerk"