diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2020-01-17 14:10:46 +0100 |
---|---|---|
committer | David RodrÃguez <deivid.rodriguez@riseup.net> | 2020-02-27 21:21:35 +0100 |
commit | b8da66bf6efde9f995999c2dce7e36603d9c2bb4 (patch) | |
tree | f9cc98205c13a0b3798d76558a814f839806fbb4 /spec | |
parent | 12181a40b1d069b8e862142cf7ee6a4da1b74e7c (diff) | |
download | bundler-b8da66bf6efde9f995999c2dce7e36603d9c2bb4.tar.gz |
Revert "Revert "Add all platforms to lockfile by default""
This reverts commit b5766564fb6ad9c74c3b87ad6b2965f3b9095d08.
Diffstat (limited to 'spec')
-rw-r--r-- | spec/install/gemfile/platform_spec.rb | 26 | ||||
-rw-r--r-- | spec/runtime/require_spec.rb | 2 |
2 files changed, 23 insertions, 5 deletions
diff --git a/spec/install/gemfile/platform_spec.rb b/spec/install/gemfile/platform_spec.rb index 52e1cf86fa..2bbda133c9 100644 --- a/spec/install/gemfile/platform_spec.rb +++ b/spec/install/gemfile/platform_spec.rb @@ -378,7 +378,7 @@ RSpec.describe "bundle install with platform conditionals" do expect(out).not_to match(/Could not find gem 'some_gem/) end - it "prints a helpful warning when a dependency is unused on any platform" do + it "resolves all platforms by default and without warning messages" do simulate_platform "ruby" simulate_ruby_engine "ruby" @@ -390,9 +390,27 @@ RSpec.describe "bundle install with platform conditionals" do bundle! "install" - expect(err).to include <<-O.strip -The dependency #{Gem::Dependency.new("rack", ">= 0")} will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`. - O + expect(err).to be_empty + + lockfile_should_be <<-L + GEM + remote: #{file_uri_for(gem_repo1)}/ + specs: + rack (1.0.0) + + PLATFORMS + java + ruby + x64-mingw32 + x86-mingw32 + x86-mswin32 + + DEPENDENCIES + rack + + BUNDLED WITH + #{Bundler::VERSION} + L end context "when disable_platform_warnings is true" do diff --git a/spec/runtime/require_spec.rb b/spec/runtime/require_spec.rb index a2e6ba7244..3b9021b4fc 100644 --- a/spec/runtime/require_spec.rb +++ b/spec/runtime/require_spec.rb @@ -423,7 +423,7 @@ RSpec.describe "Bundler.require with platform specific dependencies" do source "#{file_uri_for(gem_repo1)}" platforms :#{not_local_tag} do - gem "fail", :require => "omgomg" + gem "platform_specific", :require => "omgomg" end gem "rack", "1.0.0" |