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

51 lines
1.5 KiB
Ruby
Raw Normal View History

2020-10-15 00:20:25 -04:00
# frozen_string_literal: true
RSpec.describe "bundle update" do
before do
2020-12-08 02:36:29 -05:00
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
2020-10-15 00:20:25 -04:00
gemfile <<-G
2020-12-08 02:36:29 -05:00
source "#{file_uri_for(gem_repo2)}"
gem 'has_funding_and_other_metadata'
2020-10-15 00:20:25 -04:00
gem 'has_funding', '< 2.0'
G
bundle :install
end
context "when listed gems are updated" do
before do
gemfile <<-G
2020-12-08 02:36:29 -05:00
source "#{file_uri_for(gem_repo2)}"
gem 'has_funding_and_other_metadata'
2020-10-15 00:20:25 -04:00
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