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/runtime | |
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/runtime')
-rw-r--r-- | spec/bundler/runtime/inline_spec.rb | 4 | ||||
-rw-r--r-- | spec/bundler/runtime/require_spec.rb | 2 | ||||
-rw-r--r-- | spec/bundler/runtime/setup_spec.rb | 24 |
3 files changed, 15 insertions, 15 deletions
diff --git a/spec/bundler/runtime/inline_spec.rb b/spec/bundler/runtime/inline_spec.rb index fb6c6e90ad..4e76c2dfb0 100644 --- a/spec/bundler/runtime/inline_spec.rb +++ b/spec/bundler/runtime/inline_spec.rb @@ -59,7 +59,7 @@ RSpec.describe "bundler/inline#gemfile" do expect(out).to eq("two") expect(exitstatus).to be_zero if exitstatus - script <<-RUBY + script <<-RUBY, :raise_on_error => false gemfile do path "#{lib_path}" do gem "eleven" @@ -130,7 +130,7 @@ RSpec.describe "bundler/inline#gemfile" do end it "raises an exception if passed unknown arguments" do - script <<-RUBY + script <<-RUBY, :raise_on_error => false gemfile(true, :arglebargle => true) do path "#{lib_path}" gem "two" diff --git a/spec/bundler/runtime/require_spec.rb b/spec/bundler/runtime/require_spec.rb index 3b9021b4fc..3646b00a3d 100644 --- a/spec/bundler/runtime/require_spec.rb +++ b/spec/bundler/runtime/require_spec.rb @@ -135,7 +135,7 @@ RSpec.describe "Bundler.require" do end G - run "Bundler.require" + run "Bundler.require", :raise_on_error => false expect(err).to match("error while trying to load the gem 'faulty'") expect(err).to match("Gem Internal Error Message") end diff --git a/spec/bundler/runtime/setup_spec.rb b/spec/bundler/runtime/setup_spec.rb index 1fc9be84d8..9d03854eff 100644 --- a/spec/bundler/runtime/setup_spec.rb +++ b/spec/bundler/runtime/setup_spec.rb @@ -90,7 +90,7 @@ RSpec.describe "Bundler.setup" do end it "handles multiple non-additive invocations" do - ruby <<-RUBY + ruby <<-RUBY, :raise_on_error => false require '#{lib_dir}/bundler' Bundler.setup(:default, :test) Bundler.setup(:default) @@ -212,7 +212,7 @@ RSpec.describe "Bundler.setup" do gem "rack" G - ruby <<-R + ruby <<-R, :raise_on_error => false require '#{lib_dir}/bundler' Bundler.setup @@ -235,7 +235,7 @@ RSpec.describe "Bundler.setup" do gem "nosuchgem", "10.0" G - ruby <<-R + ruby <<-R, :raise_on_error => false require '#{lib_dir}/bundler' Bundler.setup @@ -434,7 +434,7 @@ RSpec.describe "Bundler.setup" do end it "provides a useful exception when the git repo is not checked out yet" do - run "1" + run "1", :raise_on_error => false expect(err).to match(/the git source #{lib_path('rack-1.0.0')} is not yet checked out. Please run `bundle install`/i) end @@ -475,7 +475,7 @@ RSpec.describe "Bundler.setup" do end R - run "puts 'FAIL'" + run "puts 'FAIL'", :raise_on_error => false expect(err).not_to include "This is not the git you are looking for" end @@ -521,7 +521,7 @@ RSpec.describe "Bundler.setup" do bundle! :install FileUtils.rm_rf(lib_path("local-rack")) - run "require 'rack'" + run "require 'rack'", :raise_on_error => false expect(err).to match(/Cannot use local override for rack-0.8 because #{Regexp.escape(lib_path('local-rack').to_s)} does not exist/) end @@ -543,7 +543,7 @@ RSpec.describe "Bundler.setup" do gem "rack", :git => "#{lib_path("rack-0.8")}" G - run "require 'rack'" + run "require 'rack'", :raise_on_error => false expect(err).to match(/because :branch is not specified in Gemfile/) end @@ -565,7 +565,7 @@ RSpec.describe "Bundler.setup" do gem "rack", :git => "#{lib_path("rack-0.8")}", :branch => "changed" G - run "require 'rack'" + run "require 'rack'", :raise_on_error => false expect(err).to match(/is using branch master but Gemfile specifies changed/) end @@ -585,7 +585,7 @@ RSpec.describe "Bundler.setup" do G bundle %(config set local.rack #{lib_path("local-rack")}) - run "require 'rack'" + run "require 'rack'", :raise_on_error => false expect(err).to match(/is using branch master but Gemfile specifies nonexistant/) end end @@ -1022,7 +1022,7 @@ end ref = update_git "bar", :gemspec => false do |s| s.write "bar.gemspec", "require 'foobarbaz'" end.ref_for("HEAD") - bundle :install + bundle :install, :raise_on_error => false expect(err.lines.map(&:chomp)).to include( a_string_starting_with("[!] There was an error while loading `bar.gemspec`:"), @@ -1374,7 +1374,7 @@ end gem "rack" G - ruby <<-RUBY + ruby <<-RUBY, :raise_on_error => false require "#{lib_dir}/bundler/setup" Object.new.gem "rack" puts "FAIL" @@ -1390,7 +1390,7 @@ end gem "rack" G - ruby <<-RUBY + ruby <<-RUBY, :raise_on_error => false require "#{lib_dir}/bundler/setup" Object.new.require "rack" puts "FAIL" |