diff options
author | Sutou Kouhei <kou@clear-code.com> | 2020-01-17 09:03:47 +0900 |
---|---|---|
committer | Sutou Kouhei <kou@clear-code.com> | 2020-01-17 09:03:47 +0900 |
commit | 3ca83a01484351fd4158a8b077409a4cc026e8dd (patch) | |
tree | aaca4648ae207fd2f8fe703daa33fe5f37f3c106 /spec | |
parent | d852b30b66165dbb88682f72a8929568af7e7c57 (diff) | |
download | bundler-3ca83a01484351fd4158a8b077409a4cc026e8dd.tar.gz |
Don't ignore resolved platform information
This is a follow-up change of #7522.
Diffstat (limited to 'spec')
-rw-r--r-- | spec/install/gems/resolving_spec.rb | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/spec/install/gems/resolving_spec.rb b/spec/install/gems/resolving_spec.rb index 547d13134f..1c7554700a 100644 --- a/spec/install/gems/resolving_spec.rb +++ b/spec/install/gems/resolving_spec.rb @@ -143,6 +143,29 @@ RSpec.describe "bundle install with install-time dependencies" do expect(out).to_not include("rack-9001.0.0 requires ruby version > 9000") expect(the_bundle).to include_gems("rack 1.2") end + + it "installs the older not platform specific version" do + build_repo4 do + build_gem "rack", "9001.0.0" do |s| + s.required_ruby_version = "> 9000" + end + build_gem "rack", "1.2" do |s| + s.platform = Bundler.local_platform + s.required_ruby_version = "> 9000" + end + build_gem "rack", "1.2" + end + + install_gemfile <<-G, :artifice => "compact_index_rate_limited", :env => { "BUNDLER_SPEC_GEM_REPO" => gem_repo4.to_s } + ruby "#{RUBY_VERSION}" + source "http://localgemserver.test/" + gem 'rack' + G + + expect(out).to_not include("rack-9001.0.0 requires ruby version > 9000") + expect(out).to_not include("rack-1.2-#{Bundler.local_platform} requires ruby version > 9000") + expect(the_bundle).to include_gems("rack 1.2") + end end context "allows no gems" do |