Skip to content

Commit

Permalink
Update spec for allowed_push_host for different destination
Browse files Browse the repository at this point in the history
  • Loading branch information
TonyCTHsu committed Jun 10, 2024
1 parent 0c68089 commit a325b06
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion spec/ddtrace/release_gem_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,24 @@
describe '#metadata' do
it do
{
'allowed_push_host' => 'https://rubygems.org',
'changelog_uri' => "https://github.com/DataDog/dd-trace-rb/blob/v#{gemspec.version}/CHANGELOG.md",
'source_code_uri' => "https://github.com/DataDog/dd-trace-rb/tree/v#{gemspec.version}"
}.each do |key, value|
expect(gemspec.metadata[key]).to eq(value)
end
end

# `allowed_push_host` is overwritten by automated scripts
# in order to publish to another destination repository.
context 'allowed_push_host' do
it { expect(gemspec.metadata).to have_key('allowed_push_host') }

it do
expect(gemspec.metadata['allowed_push_host'])
.to eq('https://rubygems.org')
.or eq('https://rubygems.pkg.github.com/DataDog')
end
end
end
end
end

0 comments on commit a325b06

Please sign in to comment.