From 997642cfbdaa59fe900e3177d26cb35bf8f767e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Thu, 25 Jul 2024 18:58:45 +0200 Subject: [PATCH] [rubygems/rubygems] The `simulate_platform` helper can take a string https://github.com/rubygems/rubygems/commit/680bafac1a --- spec/bundler/commands/install_spec.rb | 2 +- spec/bundler/commands/lock_spec.rb | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/bundler/commands/install_spec.rb b/spec/bundler/commands/install_spec.rb index 1c00e6fe6e..bff7fd8460 100644 --- a/spec/bundler/commands/install_spec.rb +++ b/spec/bundler/commands/install_spec.rb @@ -1170,7 +1170,7 @@ RSpec.describe "bundle install with gem sources" do end it "should fail loudly if the lockfile platforms don't include the current platform" do - simulate_platform(Gem::Platform.new("x86_64-linux")) { bundle "install", raise_on_error: false } + simulate_platform("x86_64-linux") { bundle "install", raise_on_error: false } expect(err).to eq( "Your bundle only supports platforms [\"x86_64-darwin-19\"] but your local platform is x86_64-linux. " \ diff --git a/spec/bundler/commands/lock_spec.rb b/spec/bundler/commands/lock_spec.rb index fdba96c5e1..a540092c59 100644 --- a/spec/bundler/commands/lock_spec.rb +++ b/spec/bundler/commands/lock_spec.rb @@ -1061,7 +1061,7 @@ RSpec.describe "bundle lock" do #{Bundler::VERSION} G - simulate_platform(Gem::Platform.new("x86_64-darwin-19")) { bundle "lock --update" } + simulate_platform("x86_64-darwin-19") { bundle "lock --update" } expect(out).to match(/Writing lockfile to.+Gemfile\.lock/) end @@ -1083,7 +1083,7 @@ RSpec.describe "bundle lock" do gem "libv8" G - simulate_platform(Gem::Platform.new("x86_64-darwin-19")) { bundle "lock" } + simulate_platform("x86_64-darwin-19") { bundle "lock" } checksums = checksums_section_when_enabled do |c| c.checksum gem_repo4, "libv8", "8.4.255.0", "x86_64-darwin-19" @@ -1151,7 +1151,7 @@ RSpec.describe "bundle lock" do previous_lockfile = lockfile %w[x86_64-darwin-19 x86_64-darwin-20].each do |platform| - simulate_platform(Gem::Platform.new(platform)) do + simulate_platform(platform) do bundle "lock" expect(lockfile).to eq(previous_lockfile)