[rubygems/rubygems] The simulate_platform helper can take a string

https://github.com/rubygems/rubygems/commit/680bafac1a
This commit is contained in:
David Rodríguez 2024-07-25 18:58:45 +02:00 committed by git
parent cf6efd1bb7
commit 997642cfbd
2 changed files with 4 additions and 4 deletions

View File

@ -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. " \

View File

@ -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)