diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2019-06-01 12:49:40 +0300 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2019-06-09 12:44:10 +0900 |
commit | 8f37629519ad330032a38ac0e871b2912ed38a1b (patch) | |
tree | bb0529b77583d47993d8b0d608d68896aa3a5298 /spec/bundler/install/gemfile/path_spec.rb | |
parent | 66508992483ae5d77b56a98427c50c772341c0ac (diff) |
Merge bundler master from upstream.
Pick from 8dd59e3ba97eb80a599f8149f31bf40773b69dc0
Diffstat (limited to 'spec/bundler/install/gemfile/path_spec.rb')
-rw-r--r-- | spec/bundler/install/gemfile/path_spec.rb | 64 |
1 files changed, 63 insertions, 1 deletions
diff --git a/spec/bundler/install/gemfile/path_spec.rb b/spec/bundler/install/gemfile/path_spec.rb index 54a41b576f..e80764070c 100644 --- a/spec/bundler/install/gemfile/path_spec.rb +++ b/spec/bundler/install/gemfile/path_spec.rb @@ -313,7 +313,7 @@ RSpec.describe "bundle install with explicit source paths" do install_gemfile <<-G gem 'foo', '1.0', :path => "#{lib_path("foo-1.0")}" G - expect(last_command.stderr).to be_empty + expect(err).to be_empty end it "removes the .gem file after installing" do @@ -484,6 +484,68 @@ RSpec.describe "bundle install with explicit source paths" do expect(the_bundle).to include_gems "rack 1.0.0" end + + it "keeps using the same version if it's compatible" do + build_lib "foo", "1.0", :path => lib_path("foo") do |s| + s.add_dependency "rack", "0.9.1" + end + + bundle "install" + + expect(the_bundle).to include_gems "rack 0.9.1" + + lockfile_should_be <<-G + PATH + remote: #{lib_path("foo")} + specs: + foo (1.0) + rack (= 0.9.1) + + GEM + remote: #{URI.parse("file://#{gem_repo1}/")} + specs: + rack (0.9.1) + + PLATFORMS + #{lockfile_platforms} + + DEPENDENCIES + foo! + + BUNDLED WITH + #{Bundler::VERSION} + G + + build_lib "foo", "1.0", :path => lib_path("foo") do |s| + s.add_dependency "rack" + end + + bundle "install" + + lockfile_should_be <<-G + PATH + remote: #{lib_path("foo")} + specs: + foo (1.0) + rack + + GEM + remote: #{URI.parse("file://#{gem_repo1}/")} + specs: + rack (0.9.1) + + PLATFORMS + #{lockfile_platforms} + + DEPENDENCIES + foo! + + BUNDLED WITH + #{Bundler::VERSION} + G + + expect(the_bundle).to include_gems "rack 0.9.1" + end end describe "switching sources" do |