From 0b53a8895f143ecc3d97844f5eec685dbd709d85 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Wed, 1 Dec 2021 11:00:10 +0900 Subject: Merge rubygems master fd676ac464491afaa0baf5435cb11b3f86229cbd --- spec/bundler/commands/newgem_spec.rb | 7 +++++++ spec/bundler/install/gemfile/sources_spec.rb | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'spec') diff --git a/spec/bundler/commands/newgem_spec.rb b/spec/bundler/commands/newgem_spec.rb index 5ba513861c..ddefe0ba25 100644 --- a/spec/bundler/commands/newgem_spec.rb +++ b/spec/bundler/commands/newgem_spec.rb @@ -513,6 +513,7 @@ RSpec.describe "bundle gem" do expect(bundled_app("#{gem_name}/Rakefile")).to exist expect(bundled_app("#{gem_name}/lib/#{require_path}.rb")).to exist expect(bundled_app("#{gem_name}/lib/#{require_path}/version.rb")).to exist + expect(bundled_app("#{gem_name}/sig/#{require_path}.rbs")).to exist expect(bundled_app("#{gem_name}/.gitignore")).to exist expect(bundled_app("#{gem_name}/bin/setup")).to exist @@ -529,6 +530,12 @@ RSpec.describe "bundle gem" do expect(bundled_app("#{gem_name}/lib/#{require_path}/version.rb").read).to match(/VERSION = "0.1.0"/) end + it "declare String type for VERSION constant" do + bundle "gem #{gem_name}" + + expect(bundled_app("#{gem_name}/sig/#{require_path}.rbs").read).to match(/VERSION: String/) + end + context "git config user.{name,email} is set" do before do bundle "gem #{gem_name}" diff --git a/spec/bundler/install/gemfile/sources_spec.rb b/spec/bundler/install/gemfile/sources_spec.rb index 9885145662..7a0c148254 100644 --- a/spec/bundler/install/gemfile/sources_spec.rb +++ b/spec/bundler/install/gemfile/sources_spec.rb @@ -1250,8 +1250,8 @@ RSpec.describe "bundle install with gems on multiple sources" do G end - it "installs the higher version in the new repo" do - expect(the_bundle).to include_gems("rack 1.2") + it "conservatively installs the existing locked version" do + expect(the_bundle).to include_gems("rack 1.0.0") end end -- cgit v1.2.3