summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2022-01-24 12:04:11 +0100
committergit <svn-admin@ruby-lang.org>2022-01-26 13:09:31 +0900
commitc925d3b6689515f76dcfbb1dc419746dac6f0738 (patch)
treedda99b4a0dc2b8db41a708440a51c7f2be200ea7 /spec
parentcc8064ba2e046f384f446889c8525bf976733918 (diff)
[rubygems/rubygems] Fix `force_ruby_platform` ignored when lockfile includes the current specific platform
https://github.com/rubygems/rubygems/commit/9ca371adf8
Diffstat (limited to 'spec')
-rw-r--r--spec/bundler/runtime/platform_spec.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/bundler/runtime/platform_spec.rb b/spec/bundler/runtime/platform_spec.rb
index b937de8059..f7159635e6 100644
--- a/spec/bundler/runtime/platform_spec.rb
+++ b/spec/bundler/runtime/platform_spec.rb
@@ -232,6 +232,20 @@ RSpec.describe "Bundler.setup with multi platform stuff" do
expect(the_bundle).to include_gems "nokogiri 1.4.2", "platform_specific 1.0 RUBY"
end
+ it "allows specifying only-ruby-platform even if the lockfile is locked to a specific compatible platform" do
+ install_gemfile <<-G
+ source "#{file_uri_for(gem_repo1)}"
+ gem "nokogiri"
+ gem "platform_specific"
+ G
+
+ bundle "config set force_ruby_platform true"
+
+ bundle "install"
+
+ expect(the_bundle).to include_gems "nokogiri 1.4.2", "platform_specific 1.0 RUBY"
+ end
+
it "doesn't pull platform specific gems on truffleruby", :truffleruby do
install_gemfile <<-G
source "#{file_uri_for(gem_repo1)}"