From 4e7c39f98ceaf5160d9a97b7d2405623f972773a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Fri, 17 Mar 2023 13:39:20 +0100 Subject: Don't remove RUBY platform when healing a lockfile with missing specs --- spec/bundler/lock/lockfile_spec.rb | 2 +- spec/bundler/support/platforms.rb | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'spec/bundler') diff --git a/spec/bundler/lock/lockfile_spec.rb b/spec/bundler/lock/lockfile_spec.rb index dd656ae022..78130d8f15 100644 --- a/spec/bundler/lock/lockfile_spec.rb +++ b/spec/bundler/lock/lockfile_spec.rb @@ -1262,7 +1262,7 @@ RSpec.describe "the lockfile format" do indirect_dependency (1.2.3) PLATFORMS - #{lockfile_platforms} + #{formatted_lockfile_platforms(*["ruby", generic_local_platform].uniq)} DEPENDENCIES direct_dependency diff --git a/spec/bundler/support/platforms.rb b/spec/bundler/support/platforms.rb index 89a8d45ffd..eca1b2e60d 100644 --- a/spec/bundler/support/platforms.rb +++ b/spec/bundler/support/platforms.rb @@ -96,7 +96,11 @@ module Spec end def lockfile_platforms(*extra) - [local_platform, *extra].map(&:to_s).sort.join("\n ") + formatted_lockfile_platforms(local_platform, *extra) + end + + def formatted_lockfile_platforms(*platforms) + platforms.map(&:to_s).sort.join("\n ") end end end -- cgit v1.2.1