summaryrefslogtreecommitdiff
path: root/spec/bundler/runtime
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2023-07-21 10:21:39 +0900
committergit <svn-admin@ruby-lang.org>2023-07-25 06:23:28 +0000
commit8fbe7d0295fd38496b61e2e1a93c920f93892aa4 (patch)
tree9d7858b76edb337c11f2a710b706aac6dd07705f /spec/bundler/runtime
parent422144d220e8cfec38c0b07b2ba142aa5fa9066b (diff)
[rubygems/rubygems] Skip warnings if bundled gems is already loaded
https://github.com/rubygems/rubygems/commit/9583a7eb82
Diffstat (limited to 'spec/bundler/runtime')
-rw-r--r--spec/bundler/runtime/setup_spec.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/bundler/runtime/setup_spec.rb b/spec/bundler/runtime/setup_spec.rb
index 2b2656be5a..dde418bf1d 100644
--- a/spec/bundler/runtime/setup_spec.rb
+++ b/spec/bundler/runtime/setup_spec.rb
@@ -1574,6 +1574,25 @@ end
expect(err).to include("csv is not part of the default gems")
end
+ it "don't warn with bundled gems when it's loaded twice" do
+ build_repo4 do
+ build_gem "rack"
+ end
+
+ install_gemfile <<-G
+ source "#{file_uri_for(gem_repo4)}"
+ gem "rack"
+ G
+
+ ruby <<-R
+ require 'csv'
+ require 'bundler/setup'
+ require 'csv'
+ R
+
+ expect(err).to be_empty
+ end
+
it "don't warn with bundled gems when it's declared in Gemfile" do
build_repo4 do
build_gem "csv"