Skip to content

Commit a8ae887

Browse files
committed
Use .bundle gem paths for test deps with ruby/ruby repository.
1 parent c961dbb commit a8ae887

2 files changed

Lines changed: 8 additions & 6 deletions

File tree

spec/bundled_gems_spec.rb

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,6 @@ def self.ruby=(ruby)
2424
require_relative "bundler/support/rubygems_ext"
2525
Spec::Helpers.install_dev_bundler
2626
FileUtils.mkdir_p Spec::Path.gem_path
27-
28-
%w[sinatra rack tilt rack-protection rack-session rack-test mustermann base64 logger compact_index].each do |gem|
29-
path, = Dir[File.expand_path("../.bundle/gems/#{gem}-*/lib", __dir__)]
30-
$LOAD_PATH.unshift(path) if path
31-
end
3227
end
3328

3429
config.around(:each) do |example|

spec/bundler/support/path.rb

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,8 +319,15 @@ def sinatra_dependency_paths
319319
base64
320320
logger
321321
cgi
322+
compact_index
322323
]
323-
Dir[scoped_base_system_gem_path.join("gems/{#{deps.join(",")}}-*/lib")].map(&:to_s)
324+
path = if ruby_core? && Dir.exist?(source_root.join(".bundle"))
325+
source_root.join(".bundle")
326+
else
327+
scoped_base_system_gem_path
328+
end
329+
330+
Dir[path.join("gems/{#{deps.join(',')}}-*/lib")].map(&:to_s)
324331
end
325332

326333
private

0 commit comments

Comments
 (0)