diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2020-06-03 18:43:17 +0200 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2020-06-18 19:14:15 +0900 |
commit | 61b6f53337cb71b35c56d480ec6044ba7e85cb71 (patch) | |
tree | 02cb7fb6e175c9114a87bee50551334a2f7358fb /spec/bundler/commands/newgem_spec.rb | |
parent | 529a9e8a1f804332461a8519fe46dd78f3cb4265 (diff) |
[rubygems/rubygems] Make helpers raise by default
https://github.com/rubygems/rubygems/commit/ade0c441d5
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/3212
Diffstat (limited to 'spec/bundler/commands/newgem_spec.rb')
-rw-r--r-- | spec/bundler/commands/newgem_spec.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/bundler/commands/newgem_spec.rb b/spec/bundler/commands/newgem_spec.rb index 0aec6811de..a31b28bf85 100644 --- a/spec/bundler/commands/newgem_spec.rb +++ b/spec/bundler/commands/newgem_spec.rb @@ -804,22 +804,22 @@ RSpec.describe "bundle gem" do end it "fails gracefully with a ." do - bundle "gem foo.gemspec" + bundle "gem foo.gemspec", :raise_on_error => false expect(err).to end_with("Invalid gem name foo.gemspec -- `Foo.gemspec` is an invalid constant name") end it "fails gracefully with a ^" do - bundle "gem ^" + bundle "gem ^", :raise_on_error => false expect(err).to end_with("Invalid gem name ^ -- `^` is an invalid constant name") end it "fails gracefully with a space" do - bundle "gem 'foo bar'" + bundle "gem 'foo bar'", :raise_on_error => false expect(err).to end_with("Invalid gem name foo bar -- `Foo bar` is an invalid constant name") end it "fails gracefully when multiple names are passed" do - bundle "gem foo bar baz" + bundle "gem foo bar baz", :raise_on_error => false expect(err).to eq(<<-E.strip) ERROR: "bundle gem" was called with arguments ["foo", "bar", "baz"] Usage: "bundle gem NAME [OPTIONS]" @@ -829,7 +829,7 @@ Usage: "bundle gem NAME [OPTIONS]" describe "#ensure_safe_gem_name", :readline do before do - bundle "gem #{subject}" + bundle "gem #{subject}", :raise_on_error => false end context "with an existing const name" do @@ -901,7 +901,7 @@ Usage: "bundle gem NAME [OPTIONS]" context "on conflicts with a previously created file", :readline do it "should fail gracefully" do FileUtils.touch(bundled_app("conflict-foobar")) - bundle "gem conflict-foobar" + bundle "gem conflict-foobar", :raise_on_error => false expect(err).to include("Errno::ENOTDIR") expect(exitstatus).to eql(32) if exitstatus end |