diff options
author | Carsten Wirth <carsten.wirth@homeday.de> | 2019-11-26 15:48:55 +0100 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2020-06-05 07:32:42 +0900 |
commit | 0ae5cd55e5c764c8fb14c63eb663cdbff355434e (patch) | |
tree | 0480b0e8d96762ec1cc8f307203acbafaf047e0c /spec | |
parent | c91915c1838e2492a433b00179f0cef5d72abde0 (diff) | |
download | ruby-0ae5cd55e5c764c8fb14c63eb663cdbff355434e.tar.gz |
[rubygems/rubygems] Remove multiline gem specifications correctly
https://github.com/rubygems/rubygems/commit/8dca0ad56e
Diffstat (limited to 'spec')
-rw-r--r-- | spec/bundler/commands/remove_spec.rb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/spec/bundler/commands/remove_spec.rb b/spec/bundler/commands/remove_spec.rb index ef313928e2..3b255cd03d 100644 --- a/spec/bundler/commands/remove_spec.rb +++ b/spec/bundler/commands/remove_spec.rb @@ -44,6 +44,30 @@ RSpec.describe "bundle remove" do source "#{file_uri_for(gem_repo1)}" G end + + context "when gem is specified in multiple lines" do + it "shows success for removed gem" do + gemfile <<-G + source '#{file_uri_for(gem_repo1)}' + + gem 'git' + gem 'rack', + git: 'https://github.com/rack/rack', + branch: 'master' + gem 'nokogiri' + G + + bundle! "remove rack" + + expect(out).to include("rack was removed.") + gemfile_should_be <<-G + source '#{file_uri_for(gem_repo1)}' + + gem 'git' + gem 'nokogiri' + G + end + end end context "when gem is not present in gemfile" do |