diff options
author | Samuel Giddins <segiddins@segiddins.me> | 2017-08-30 15:13:42 -0500 |
---|---|---|
committer | Samuel Giddins <segiddins@segiddins.me> | 2017-09-08 10:46:55 -0700 |
commit | 7fb9fa70915dc687f5e0f5c65f26538dd77760da (patch) | |
tree | f544e47a930c35e82010467d93203cc52409c154 | |
parent | 9499ae7665469238e5261592cc0bc2a9399de667 (diff) | |
download | bundler-7fb9fa70915dc687f5e0f5c65f26538dd77760da.tar.gz |
Test that standalone writes to path relative to cwd on 2.0
-rw-r--r-- | spec/install/gems/standalone_spec.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/spec/install/gems/standalone_spec.rb b/spec/install/gems/standalone_spec.rb index 431854e6d5..f0aa96290d 100644 --- a/spec/install/gems/standalone_spec.rb +++ b/spec/install/gems/standalone_spec.rb @@ -76,7 +76,9 @@ RSpec.shared_examples "bundle install --standalone" do end it "generates a bundle/bundler/setup.rb with the proper paths", :rubygems => "2.4" do - extension_line = File.read(bundled_app("bundle/bundler/setup.rb")).each_line.find {|line| line.include? "/extensions/" }.strip + expected_path = (Bundler.feature_flag.path_relative_to_cwd? ? Pathname.pwd : bundled_app). + join("bundle/bundler/setup.rb") + extension_line = File.read(expected_path).each_line.find {|line| line.include? "/extensions/" }.strip expect(extension_line).to start_with '$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/extensions/' expect(extension_line).to end_with '/very_simple_binary-1.0"' end |