Skip to content

Commit b479c41

Browse files
committed
Use .bundle gems dependencies directly
1 parent f3ee4bd commit b479c41

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

spec/bundled_gems_spec.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ 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
2732
end
2833

2934
config.around(:each) do |example|
3035
FileUtils.cp_r Spec::Path.pristine_system_gem_path, Spec::Path.system_gem_path
31-
FileUtils.mkdir_p Spec::Path.base_system_gem_path.join("gems")
32-
%w[sinatra rack tilt rack-protection rack-session rack-test mustermann base64 logger compact_index].each do |gem|
33-
path, = Dir[File.expand_path("../.bundle/gems/#{gem}-*", __dir__)]
34-
FileUtils.cp_r path, Spec::Path.base_system_gem_path.join("gems")
35-
end
3636

3737
with_gem_path_as(system_gem_path) do
3838
Bundler.ui.silence { example.run }

0 commit comments

Comments
 (0)