diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2020-06-22 12:41:13 +0200 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2020-07-15 16:05:12 +0900 |
commit | 4f9c673cabcf9ae1d7ac2aa9d4a632f41ae76e38 (patch) | |
tree | 588251298a0fe39ff5c3e3ebec13a5755e8e80c3 /spec | |
parent | ca133c03669d495d297579e1f14bc904db591e1d (diff) | |
download | ruby-4f9c673cabcf9ae1d7ac2aa9d4a632f41ae76e38.tar.gz |
[rubygems/rubygems] Allow setting a tag prefix to be used by gem release tasks
https://github.com/rubygems/rubygems/commit/679008f23a
Diffstat (limited to 'spec')
-rw-r--r-- | spec/bundler/bundler/gem_helper_spec.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/bundler/bundler/gem_helper_spec.rb b/spec/bundler/bundler/gem_helper_spec.rb index 6cb4c33f5a..b91a2c26cc 100644 --- a/spec/bundler/bundler/gem_helper_spec.rb +++ b/spec/bundler/bundler/gem_helper_spec.rb @@ -258,6 +258,23 @@ RSpec.describe Bundler::GemHelper do end end + context "on releasing with a custom tag prefix" do + before do + Bundler::GemHelper.tag_prefix = "foo-" + mock_build_message app_name, app_version + mock_confirm_message "Pushed git commits and tags." + + sys_exec("git push -u origin master", :dir => app_path) + expect(subject).to receive(:rubygem_push).with(app_gem_path.to_s) + end + + it "prepends the custom prefix to the tag" do + mock_confirm_message "Tagged foo-v#{app_version}." + + Rake.application["release"].invoke + end + end + it "even if tag already exists" do mock_build_message app_name, app_version mock_confirm_message "Tag v#{app_version} has already been created." |