diff --git a/spec/bundler/bundler/definition_spec.rb b/spec/bundler/bundler/definition_spec.rb index d04b21659a..59b958ae42 100644 --- a/spec/bundler/bundler/definition_spec.rb +++ b/spec/bundler/bundler/definition_spec.rb @@ -154,7 +154,7 @@ RSpec.describe Bundler::Definition do only_java (1.1-java) PLATFORMS - #{lockfile_platforms_for("java", specific_local_platform)} + #{lockfile_platforms("java")} DEPENDENCIES only_java diff --git a/spec/bundler/install/gemfile/gemspec_spec.rb b/spec/bundler/install/gemfile/gemspec_spec.rb index a9e6c70128..2aa4214818 100644 --- a/spec/bundler/install/gemfile/gemspec_spec.rb +++ b/spec/bundler/install/gemfile/gemspec_spec.rb @@ -674,7 +674,7 @@ RSpec.describe "bundle install from an existing gemspec" do railties (6.1.4) PLATFORMS - #{lockfile_platforms_for("java", specific_local_platform)} + #{lockfile_platforms("java")} DEPENDENCIES activeadmin! diff --git a/spec/bundler/install/gemfile/specific_platform_spec.rb b/spec/bundler/install/gemfile/specific_platform_spec.rb index a7fac3da91..ce148af43d 100644 --- a/spec/bundler/install/gemfile/specific_platform_spec.rb +++ b/spec/bundler/install/gemfile/specific_platform_spec.rb @@ -514,7 +514,7 @@ RSpec.describe "bundle install with specific platforms" do sorbet-runtime (= 0.5.10160) PLATFORMS - #{lockfile_platforms_for([specific_local_platform, "ruby"])} + #{lockfile_platforms("ruby")} DEPENDENCIES sorbet-static-and-runtime @@ -769,7 +769,7 @@ RSpec.describe "bundle install with specific platforms" do nokogiri (1.13.8-#{Gem::Platform.local}) PLATFORMS - #{lockfile_platforms_for([specific_local_platform, "ruby"])} + #{lockfile_platforms("ruby")} DEPENDENCIES nokogiri diff --git a/spec/bundler/lock/lockfile_spec.rb b/spec/bundler/lock/lockfile_spec.rb index d402795592..dd656ae022 100644 --- a/spec/bundler/lock/lockfile_spec.rb +++ b/spec/bundler/lock/lockfile_spec.rb @@ -982,7 +982,7 @@ RSpec.describe "the lockfile format" do rack (1.0.0) PLATFORMS - #{lockfile_platforms_for("java", specific_local_platform)} + #{lockfile_platforms("java")} DEPENDENCIES rack diff --git a/spec/bundler/runtime/platform_spec.rb b/spec/bundler/runtime/platform_spec.rb index 4a6aed9893..b31bc4abe8 100644 --- a/spec/bundler/runtime/platform_spec.rb +++ b/spec/bundler/runtime/platform_spec.rb @@ -86,7 +86,7 @@ RSpec.describe "Bundler.setup with multi platform stuff" do racc (1.5.2) PLATFORMS - #{lockfile_platforms_for("ruby", specific_local_platform)} + #{lockfile_platforms("ruby")} DEPENDENCIES nokogiri (~> 1.11) diff --git a/spec/bundler/support/platforms.rb b/spec/bundler/support/platforms.rb index 355053a4fd..3cc28e0a61 100644 --- a/spec/bundler/support/platforms.rb +++ b/spec/bundler/support/platforms.rb @@ -99,12 +99,8 @@ module Spec 9999 end - def lockfile_platforms - lockfile_platforms_for(specific_local_platform) - end - - def lockfile_platforms_for(*platforms) - platforms.map(&:to_s).sort.join("\n ") + def lockfile_platforms(*extra) + [specific_local_platform, *extra].map(&:to_s).sort.join("\n ") end end end