[rubygems/rubygems] Reduce duplication a bit

0574c62fc0
This commit is contained in:
David Rodríguez 2023-03-13 14:26:05 +01:00 committed by Hiroshi SHIBATA
parent 11492bd88d
commit e74008bfc9
2 changed files with 2 additions and 2 deletions

View file

@ -182,7 +182,7 @@ module Bundler
end end
def current_version def current_version
@current_version ||= Gem::Version.new(Bundler::VERSION) @current_version ||= Bundler.gem_version
end end
def lockfile_version def lockfile_version

View file

@ -19,7 +19,7 @@ RSpec.describe "post bundle message" do
let(:bundle_complete_message) { "Bundle complete!" } let(:bundle_complete_message) { "Bundle complete!" }
let(:bundle_updated_message) { "Bundle updated!" } let(:bundle_updated_message) { "Bundle updated!" }
let(:installed_gems_stats) { "4 Gemfile dependencies, 5 gems now installed." } let(:installed_gems_stats) { "4 Gemfile dependencies, 5 gems now installed." }
let(:bundle_show_message) { Bundler::VERSION.split(".").first.to_i < 3 ? bundle_show_system_message : bundle_show_path_message } let(:bundle_show_message) { Bundler.bundler_major_version < 3 ? bundle_show_system_message : bundle_show_path_message }
describe "for fresh bundle install" do describe "for fresh bundle install" do
it "shows proper messages according to the configured groups" do it "shows proper messages according to the configured groups" do