diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2023-07-20 09:34:25 +0900 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2023-07-25 06:23:24 +0000 |
commit | df4ac25bd957b4a22acc3243de4af310efc473f1 (patch) | |
tree | bc6eb24988c10ee8a36db9be3925eb44a0325760 /spec | |
parent | 0ae227ebe22bcec74fcd5fd6acd1b724ab0d8c16 (diff) | |
download | ruby-df4ac25bd957b4a22acc3243de4af310efc473f1.tar.gz |
[rubygems/rubygems] Added examples for warnings feature
https://github.com/rubygems/rubygems/commit/78807add23
Diffstat (limited to 'spec')
-rw-r--r-- | spec/bundler/runtime/setup_spec.rb | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/spec/bundler/runtime/setup_spec.rb b/spec/bundler/runtime/setup_spec.rb index 75f2a62868..ed2a2e9974 100644 --- a/spec/bundler/runtime/setup_spec.rb +++ b/spec/bundler/runtime/setup_spec.rb @@ -1555,4 +1555,33 @@ end sys_exec "#{Gem.ruby} #{script}", :raise_on_error => false expect(out).to include("requiring foo used the monkeypatch") end + + it "warn with bundled gems when it's loaded" do + install_gemfile <<-G + source "#{file_uri_for(gem_repo1)}" + gem "rack" + G + + ruby <<-R + require 'bundler/setup' + require 'csv' + R + + expect(err).to include("csv is not part of the bundle") + end + + it "don't warn with bundled gems when it's declared in Gemfile" do + install_gemfile <<-G + source "#{file_uri_for(gem_repo1)}" + gem "rack" + gem "csv" + G + + ruby <<-R + require 'bundler/setup' + require 'csv' + R + + expect(err).to be_empty + end end |