aboutsummaryrefslogtreecommitdiffstats
path: root/spec/bundler/install
diff options
context:
space:
mode:
authormoe <moe@busyloop.net>2022-07-25 13:40:04 +0200
committergit <svn-admin@ruby-lang.org>2022-07-27 05:39:40 +0900
commitc3d9849df9759caf298e4d0edca1e59f16e153d1 (patch)
tree4cb7b5bb650c11932b6fa68e223056afe282af07 /spec/bundler/install
parent64f9f7d855a0367c4518e9a2a4cd26e0d0344856 (diff)
downloadruby-c3d9849df9759caf298e4d0edca1e59f16e153d1.tar.gz
[rubygems/rubygems] Add ignore_funding_requests config flag
https://github.com/rubygems/rubygems/commit/ab302f72c9
Diffstat (limited to 'spec/bundler/install')
-rw-r--r--spec/bundler/install/gems/fund_spec.rb27
1 files changed, 27 insertions, 0 deletions
diff --git a/spec/bundler/install/gems/fund_spec.rb b/spec/bundler/install/gems/fund_spec.rb
index f521b0296f..436454c1f4 100644
--- a/spec/bundler/install/gems/fund_spec.rb
+++ b/spec/bundler/install/gems/fund_spec.rb
@@ -52,6 +52,33 @@ RSpec.describe "bundle install" do
end
end
+ context "when gems include a fund URI but `ignore_funding_requests` is configured" do
+ before do
+ bundle "config set ignore_funding_requests true"
+ end
+
+ it "does not display the plural fund message after installing" do
+ install_gemfile <<-G
+ source "#{file_uri_for(gem_repo2)}"
+ gem 'has_funding_and_other_metadata'
+ gem 'has_funding'
+ gem 'rack-obama'
+ G
+
+ expect(out).not_to include("2 installed gems you directly depend on are looking for funding.")
+ end
+
+ it "does not display the singular fund message after installing" do
+ install_gemfile <<-G
+ source "#{file_uri_for(gem_repo2)}"
+ gem 'has_funding'
+ gem 'rack-obama'
+ G
+
+ expect(out).not_to include("1 installed gem you directly depend on is looking for funding.")
+ end
+ end
+
context "when gems do not include fund messages" do
it "does not display any fund messages" do
install_gemfile <<-G