[rubygems/rubygems] The simulate_platform
helper can take a string
https://github.com/rubygems/rubygems/commit/680bafac1a
This commit is contained in:
parent
cf6efd1bb7
commit
997642cfbd
@ -1170,7 +1170,7 @@ RSpec.describe "bundle install with gem sources" do
|
|||||||
end
|
end
|
||||||
|
|
||||||
it "should fail loudly if the lockfile platforms don't include the current platform" do
|
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(
|
expect(err).to eq(
|
||||||
"Your bundle only supports platforms [\"x86_64-darwin-19\"] but your local platform is x86_64-linux. " \
|
"Your bundle only supports platforms [\"x86_64-darwin-19\"] but your local platform is x86_64-linux. " \
|
||||||
|
@ -1061,7 +1061,7 @@ RSpec.describe "bundle lock" do
|
|||||||
#{Bundler::VERSION}
|
#{Bundler::VERSION}
|
||||||
G
|
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/)
|
expect(out).to match(/Writing lockfile to.+Gemfile\.lock/)
|
||||||
end
|
end
|
||||||
@ -1083,7 +1083,7 @@ RSpec.describe "bundle lock" do
|
|||||||
gem "libv8"
|
gem "libv8"
|
||||||
G
|
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|
|
checksums = checksums_section_when_enabled do |c|
|
||||||
c.checksum gem_repo4, "libv8", "8.4.255.0", "x86_64-darwin-19"
|
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
|
previous_lockfile = lockfile
|
||||||
|
|
||||||
%w[x86_64-darwin-19 x86_64-darwin-20].each do |platform|
|
%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"
|
bundle "lock"
|
||||||
expect(lockfile).to eq(previous_lockfile)
|
expect(lockfile).to eq(previous_lockfile)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user