diff options
Diffstat (limited to 'spec/install/gemfile/path_spec.rb')
-rw-r--r-- | spec/install/gemfile/path_spec.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/install/gemfile/path_spec.rb b/spec/install/gemfile/path_spec.rb index f7789e7ea5..44d1e67106 100644 --- a/spec/install/gemfile/path_spec.rb +++ b/spec/install/gemfile/path_spec.rb @@ -132,6 +132,20 @@ RSpec.describe "bundle install with explicit source paths" do expect(the_bundle).to include_gems "foo 1.0" end + it "works with only_update_to_newer_versions" do + build_lib "omg", "2.0", :path => lib_path("omg") + + install_gemfile <<-G + gem "omg", :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 + it "prefers gemspecs closer to the path root" do build_lib "premailer", "1.0.0", :path => lib_path("premailer") do |s| s.write "gemfiles/ruby187.gemspec", <<-G |