summaryrefslogtreecommitdiff
path: root/spec/bundler/install/gems/fund_spec.rb
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2020-12-08 16:36:29 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2020-12-08 17:30:02 +0900
commit473f9d2df0ddd7fdb5cc73fa3ad49b2f19f22b06 (patch)
tree6b39312502d32474da0157f5d55620fabd6454ea /spec/bundler/install/gems/fund_spec.rb
parent4aca77edde91f826aa243e268bf1ef5214530583 (diff)
downloadruby-473f9d2df0ddd7fdb5cc73fa3ad49b2f19f22b06.tar.gz
Merge prepare version of Bundler 2.2.0
Diffstat (limited to 'spec/bundler/install/gems/fund_spec.rb')
-rw-r--r--spec/bundler/install/gems/fund_spec.rb37
1 files changed, 32 insertions, 5 deletions
diff --git a/spec/bundler/install/gems/fund_spec.rb b/spec/bundler/install/gems/fund_spec.rb
index 57e7c3aed3..f521b0296f 100644
--- a/spec/bundler/install/gems/fund_spec.rb
+++ b/spec/bundler/install/gems/fund_spec.rb
@@ -2,11 +2,38 @@
RSpec.describe "bundle install" do
context "with gem sources" do
+ before do
+ build_repo2 do
+ build_gem "has_funding_and_other_metadata" do |s|
+ s.metadata = {
+ "bug_tracker_uri" => "https://example.com/user/bestgemever/issues",
+ "changelog_uri" => "https://example.com/user/bestgemever/CHANGELOG.md",
+ "documentation_uri" => "https://www.example.info/gems/bestgemever/0.0.1",
+ "homepage_uri" => "https://bestgemever.example.io",
+ "mailing_list_uri" => "https://groups.example.com/bestgemever",
+ "funding_uri" => "https://example.com/has_funding_and_other_metadata/funding",
+ "source_code_uri" => "https://example.com/user/bestgemever",
+ "wiki_uri" => "https://example.com/user/bestgemever/wiki",
+ }
+ end
+
+ build_gem "has_funding", "1.2.3" do |s|
+ s.metadata = {
+ "funding_uri" => "https://example.com/has_funding/funding",
+ }
+ end
+
+ build_gem "gem_with_dependent_funding", "1.0" do |s|
+ s.add_dependency "has_funding"
+ end
+ end
+ end
+
context "when gems include a fund URI" do
it "displays the plural fund message after installing" do
install_gemfile <<-G
- source "#{file_uri_for(gem_repo1)}"
- gem 'has_metadata'
+ source "#{file_uri_for(gem_repo2)}"
+ gem 'has_funding_and_other_metadata'
gem 'has_funding'
gem 'rack-obama'
G
@@ -16,7 +43,7 @@ RSpec.describe "bundle install" do
it "displays the singular fund message after installing" do
install_gemfile <<-G
- source "#{file_uri_for(gem_repo1)}"
+ source "#{file_uri_for(gem_repo2)}"
gem 'has_funding'
gem 'rack-obama'
G
@@ -28,7 +55,7 @@ RSpec.describe "bundle install" do
context "when gems do not include fund messages" do
it "does not display any fund messages" do
install_gemfile <<-G
- source "#{file_uri_for(gem_repo1)}"
+ source "#{file_uri_for(gem_repo2)}"
gem "activesupport"
G
@@ -39,7 +66,7 @@ RSpec.describe "bundle install" do
context "when a dependency includes a fund message" do
it "does not display the fund message" do
install_gemfile <<-G
- source "#{file_uri_for(gem_repo1)}"
+ source "#{file_uri_for(gem_repo2)}"
gem 'gem_with_dependent_funding'
G