diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-06-11 11:44:19 +0200 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2019-08-03 09:29:55 +0900 |
commit | 1c070c9c2908736d610773a980a73395f5188cf2 (patch) | |
tree | c295f308ba59f46192ef82bd3bf2d24299dcc75c /spec | |
parent | a27198f64850441688ae77d329eab66049d0f5e5 (diff) |
[bundler/bundler] Move "on releasing" to a RSpec context
So we can later add more tests with the same setup.
https://github.com/bundler/bundler/commit/21b4b6c49c
Diffstat (limited to 'spec')
-rw-r--r-- | spec/bundler/bundler/gem_helper_spec.rb | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/spec/bundler/bundler/gem_helper_spec.rb b/spec/bundler/bundler/gem_helper_spec.rb index 315a2290c7..a7ecb63495 100644 --- a/spec/bundler/bundler/gem_helper_spec.rb +++ b/spec/bundler/bundler/gem_helper_spec.rb @@ -218,15 +218,20 @@ RSpec.describe Bundler::GemHelper do end end - it "on releasing" do - mock_build_message app_name, app_version - mock_confirm_message "Tagged v#{app_version}." - mock_confirm_message "Pushed git commits and tags." - expect(subject).to receive(:rubygem_push).with(app_gem_path.to_s) + context "on releasing" do + before do + mock_build_message app_name, app_version + mock_confirm_message "Tagged v#{app_version}." + mock_confirm_message "Pushed git commits and tags." - Dir.chdir(app_path) { sys_exec("git push -u origin master") } + Dir.chdir(app_path) { sys_exec("git push -u origin master") } + end - Rake.application["release"].invoke + it "calls rubygem_push with proper arguments" do + expect(subject).to receive(:rubygem_push).with(app_gem_path.to_s) + + Rake.application["release"].invoke + end end it "even if tag already exists" do |