diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2023-07-20 12:58:26 +0900 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2023-07-25 06:23:26 +0000 |
commit | 64530b545fec528de3423fbfe83dbe2138754715 (patch) | |
tree | 5643278a3aed269871cd5ffddef1abd971d6f09a /spec | |
parent | fc5dbea4c3aca71b97db22b47b934454705ceed8 (diff) | |
download | ruby-64530b545fec528de3423fbfe83dbe2138754715.tar.gz |
[rubygems/rubygems] Added warnings targets for old version of Ruby
https://github.com/rubygems/rubygems/commit/d0c1d97105
Diffstat (limited to 'spec')
-rw-r--r-- | spec/bundler/runtime/setup_spec.rb | 37 | ||||
-rw-r--r-- | spec/bundler/support/builders.rb | 1 |
2 files changed, 34 insertions, 4 deletions
diff --git a/spec/bundler/runtime/setup_spec.rb b/spec/bundler/runtime/setup_spec.rb index f1ea79512f..2b2656be5a 100644 --- a/spec/bundler/runtime/setup_spec.rb +++ b/spec/bundler/runtime/setup_spec.rb @@ -1557,8 +1557,12 @@ end end it "warn with bundled gems when it's loaded" do + build_repo4 do + build_gem "rack" + end + install_gemfile <<-G - source "#{file_uri_for(gem_repo1)}" + source "#{file_uri_for(gem_repo4)}" gem "rack" G @@ -1571,9 +1575,12 @@ end end it "don't warn with bundled gems when it's declared in Gemfile" do + build_repo4 do + build_gem "csv" + end + install_gemfile <<-G - source "#{file_uri_for(gem_repo1)}" - gem "rack" + source "#{file_uri_for(gem_repo4)}" gem "csv" G @@ -1584,4 +1591,28 @@ end expect(err).to be_empty end + + it "warn foo-bar style gems correct name" do + build_repo4 do + build_gem "net-imap" do |s| + s.write "lib/net/imap.rb", "NET_IMAP = '0.0.1'" + end + build_gem "csv" + end + + install_gemfile <<-G + source "#{file_uri_for(gem_repo4)}" + gem "csv" + G + + ruby <<-R + require 'bundler/setup' + begin + require 'net/imap' + rescue LoadError + end + R + + expect(err).to include("net-imap is not part of the default gems") + end end diff --git a/spec/bundler/support/builders.rb b/spec/bundler/support/builders.rb index a2e93060fe..7b91aaef57 100644 --- a/spec/bundler/support/builders.rb +++ b/spec/bundler/support/builders.rb @@ -27,7 +27,6 @@ module Spec build_gem "git" build_gem "puma" build_gem "minitest" - build_gem "csv" build_gem "rack", %w[0.9.1 1.0.0] do |s| s.executables = "rackup" |