diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2022-07-24 22:32:34 +0200 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2022-07-30 04:24:25 +0900 |
commit | 030050cdfa9ae65cbbcd0f708aa2459e0ef17c3a (patch) | |
tree | 0e98df397935998124faf5a9d1c9bec509bb64b8 /spec/bundler/install | |
parent | b515fdcc32a6a7d484c73f090fa2a58a8662e6ca (diff) | |
download | ruby-030050cdfa9ae65cbbcd0f708aa2459e0ef17c3a.tar.gz |
[rubygems/rubygems] Make `--standalone` play nice with `--local`
I'm not sure if using relative paths in the generated script is best for
this case, since it makes the script not movable, but that can be
improved later.
https://github.com/rubygems/rubygems/commit/7f5bdbb842
Diffstat (limited to 'spec/bundler/install')
-rw-r--r-- | spec/bundler/install/gems/standalone_spec.rb | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/spec/bundler/install/gems/standalone_spec.rb b/spec/bundler/install/gems/standalone_spec.rb index a5302877c1..238006c02b 100644 --- a/spec/bundler/install/gems/standalone_spec.rb +++ b/spec/bundler/install/gems/standalone_spec.rb @@ -461,3 +461,31 @@ RSpec.describe "bundle install --standalone run in a subdirectory" do include_examples("bundle install --standalone") end + +RSpec.describe "bundle install --standalone --local" do + before do + gemfile <<-G + source "#{file_uri_for(gem_repo1)}" + gem "rack" + G + + system_gems "rack-1.0.0", :path => default_bundle_path + end + + it "generates script pointing to system gems" do + bundle "install --standalone --local --verbose" + + expect(out).to include("Using rack 1.0.0") + + load_error_ruby <<-RUBY, "spec" + require "./bundler/setup" + + require "rack" + puts RACK + require "spec" + RUBY + + expect(out).to eq("1.0.0") + expect(err).to eq("ZOMG LOAD ERROR") + end +end |