1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[rubygems/rubygems] Make helpers raise by default

ade0c441d5
This commit is contained in:
David Rodríguez 2020-06-03 18:43:17 +02:00 committed by Hiroshi SHIBATA
parent 529a9e8a1f
commit 61b6f53337
Notes: git 2020-06-18 19:15:18 +09:00
61 changed files with 378 additions and 390 deletions

View file

@ -7,7 +7,7 @@ RSpec.describe "bundle remove" do
source "#{file_uri_for(gem_repo1)}"
G
bundle "remove"
bundle "remove", :raise_on_error => false
expect(err).to include("Please specify gems to remove.")
end
@ -76,7 +76,7 @@ RSpec.describe "bundle remove" do
source "#{file_uri_for(gem_repo1)}"
G
bundle "remove rack"
bundle "remove rack", :raise_on_error => false
expect(err).to include("`rack` is not specified in #{bundled_app_gemfile} so it could not be removed.")
end
@ -113,7 +113,7 @@ RSpec.describe "bundle remove" do
gem "rspec"
G
bundle "remove rails rack minitest"
bundle "remove rails rack minitest", :raise_on_error => false
expect(err).to include("`rack` is not specified in #{bundled_app_gemfile} so it could not be removed.")
gemfile_should_be <<-G
@ -340,7 +340,7 @@ RSpec.describe "bundle remove" do
gem "rack"; gem "rails"
G
bundle "remove rails"
bundle "remove rails", :raise_on_error => false
expect(err).to include("Gems could not be removed. rack (>= 0) would also have been removed.")
gemfile_should_be <<-G
@ -352,7 +352,7 @@ RSpec.describe "bundle remove" do
context "when some gems could not be removed" do
it "shows warning for gems not removed and success for those removed" do
install_gemfile <<-G
install_gemfile <<-G, :raise_on_error => false
source "#{file_uri_for(gem_repo1)}"
gem"rack"
gem"rspec"
@ -458,7 +458,7 @@ RSpec.describe "bundle remove" do
eval_gemfile "Gemfile-other"
G
bundle "remove rack"
bundle "remove rack", :raise_on_error => false
expect(err).to include("`rack` is not specified in #{bundled_app_gemfile} so it could not be removed.")
end
@ -477,7 +477,7 @@ RSpec.describe "bundle remove" do
gem "rack"
G
bundle "remove rack"
bundle "remove rack", :raise_on_error => false
expect(out).to include("rack was removed.")
expect(err).to include("`rack` is not specified in #{bundled_app("Gemfile-other")} so it could not be removed.")
@ -502,7 +502,7 @@ RSpec.describe "bundle remove" do
gem "rack"
G
bundle "remove rack"
bundle "remove rack", :raise_on_error => false
expect(out).to include("rack was removed.")
expect(err).to include("Gems could not be removed. rails (>= 0) would also have been removed.")
@ -527,7 +527,7 @@ RSpec.describe "bundle remove" do
gem "rails"; gem "rack"
G
bundle "remove rack"
bundle "remove rack", :raise_on_error => false
expect(err).to include("Gems could not be removed. rails (>= 0) would also have been removed.")
expect(bundled_app("Gemfile-other").read).to include("gem \"rack\"")