diff options
author | Grey Baker <greysteil@gmail.com> | 2018-11-21 13:36:48 +0000 |
---|---|---|
committer | Grey Baker <greysteil@gmail.com> | 2018-11-21 13:36:48 +0000 |
commit | de3cf59d1a6547417c4c89b4d143f71980f70088 (patch) | |
tree | cd4a7278ad1a4afe2f6ed8e5aa947f6dee08bb24 | |
parent | fdb3a609adca1acfc9e1d0ed178cc70dbd6d9c60 (diff) | |
download | bundler-de3cf59d1a6547417c4c89b4d143f71980f70088.tar.gz |
Add test that gemspec version downgrades work with BUNDLE_BUNDLE_ONLY_UPDATE_TO_NEWER_VERSIONS
-rw-r--r-- | spec/install/gemfile/gemspec_spec.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/install/gemfile/gemspec_spec.rb b/spec/install/gemfile/gemspec_spec.rb index 7ce037730e..833b409801 100644 --- a/spec/install/gemfile/gemspec_spec.rb +++ b/spec/install/gemfile/gemspec_spec.rb @@ -263,6 +263,20 @@ RSpec.describe "bundle install from an existing gemspec" do expect(out).to eq("WIN") end + it "works with only_update_to_newer_versions" do + build_lib "omg", "2.0", :path => lib_path("omg") + + install_gemfile <<-G + gemspec :path => "#{lib_path("omg")}" + G + + build_lib "omg", "1.0", :path => lib_path("omg") + + bundle! :install, :env => { "BUNDLE_BUNDLE_ONLY_UPDATE_TO_NEWER_VERSIONS" => "true" } + + expect(the_bundle).to include_gems "omg 1.0" + end + context "in deployment mode" do context "when the lockfile was not updated after a change to the gemspec's dependencies" do it "reports that installation failed" do |