1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/spec/bundler/update/gems/fund_spec.rb
2020-12-08 17:30:02 +09:00

50 lines
1.5 KiB
Ruby

# frozen_string_literal: true
RSpec.describe "bundle update" 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
end
gemfile <<-G
source "#{file_uri_for(gem_repo2)}"
gem 'has_funding_and_other_metadata'
gem 'has_funding', '< 2.0'
G
bundle :install
end
context "when listed gems are updated" do
before do
gemfile <<-G
source "#{file_uri_for(gem_repo2)}"
gem 'has_funding_and_other_metadata'
gem 'has_funding'
G
bundle :update, :all => true
end
it "displays fund message" do
expect(out).to include("2 installed gems you directly depend on are looking for funding.")
end
end
end