[rubygems/rubygems] Cleanup some specs after recent support drop

https://github.com/rubygems/rubygems/commit/9548aa6766
This commit is contained in:
David Rodríguez 2024-10-22 09:27:58 +02:00 committed by git
parent 7b16eb8c1e
commit 54065f3b7b
3 changed files with 3 additions and 66 deletions

View File

@ -229,21 +229,13 @@ RSpec.describe "bundle binstubs <gem>" do
lockfile lockfile_content
end
it "installs and runs the exact version of bundler", rubygems: ">= 3.3.0.dev" do
it "installs and runs the exact version of bundler" do
bundle "install --verbose", bundle_bin: "bin/bundle"
expect(exitstatus).not_to eq(42)
expect(out).to include("Bundler 2.999.999 is running, but your lockfile was generated with 2.3.0. Installing Bundler 2.3.0 and restarting using that version.")
expect(out).to include("Using bundler 2.3.0")
expect(err).not_to include("Activating bundler (~> 2.3.0) failed:")
end
it "runs the available version of bundler", rubygems: "< 3.3.0.dev" do
bundle "install --verbose", bundle_bin: "bin/bundle"
expect(exitstatus).not_to eq(42)
expect(out).not_to include("Bundler 2.999.999 is running, but your lockfile was generated with 2.3.0. Installing Bundler 2.3.0 and restarting using that version.")
expect(out).to include("Using bundler 2.999.999")
expect(err).not_to include("Activating bundler (~> 2.3.0) failed:")
end
end
context "and the version is a pre-releaser" do

View File

@ -84,7 +84,7 @@ RSpec.describe "the lockfile format" do
G
end
it "does not update the lockfile's bundler version if nothing changed during bundle install, but uses the locked version", rubygems: ">= 3.3.0.a" do
it "does not update the lockfile's bundler version if nothing changed during bundle install, but uses the locked version" do
version = "2.3.0"
build_repo4 do
@ -135,61 +135,6 @@ RSpec.describe "the lockfile format" do
G
end
it "does not update the lockfile's bundler version if nothing changed during bundle install, and uses the latest version", rubygems: "< 3.3.0.a" do
version = "#{Bundler::VERSION.split(".").first}.0.0.a"
build_repo4 do
build_gem "myrack", "1.0.0"
build_bundler version
end
checksums = checksums_section do |c|
c.checksum(gem_repo4, "myrack", "1.0.0")
end
lockfile <<-L
GEM
remote: https://gem.repo4/
specs:
myrack (1.0.0)
PLATFORMS
#{lockfile_platforms}
DEPENDENCIES
myrack
#{checksums}
BUNDLED WITH
#{version}
L
install_gemfile <<-G, verbose: true
source "https://gem.repo4"
gem "myrack"
G
expect(out).not_to include("Bundler #{Bundler::VERSION} is running, but your lockfile was generated with #{version}.")
expect(out).to include("Using bundler #{Bundler::VERSION}")
expect(lockfile).to eq <<~G
GEM
remote: https://gem.repo4/
specs:
myrack (1.0.0)
PLATFORMS
#{lockfile_platforms}
DEPENDENCIES
myrack
#{checksums}
BUNDLED WITH
#{version}
G
end
it "adds the BUNDLED WITH section if not present" do
lockfile <<-L
GEM

View File

@ -1,6 +1,6 @@
# frozen_string_literal: true
RSpec.describe "Self management", rubygems: ">= 3.3.0.dev" do
RSpec.describe "Self management" do
describe "auto switching" do
let(:previous_minor) do
"2.3.0"