aboutsummaryrefslogtreecommitdiffstats
path: root/spec/bundler/bundler
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2020-06-03 18:43:17 +0200
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2020-06-18 19:14:15 +0900
commit61b6f53337cb71b35c56d480ec6044ba7e85cb71 (patch)
tree02cb7fb6e175c9114a87bee50551334a2f7358fb /spec/bundler/bundler
parent529a9e8a1f804332461a8519fe46dd78f3cb4265 (diff)
downloadruby-61b6f53337cb71b35c56d480ec6044ba7e85cb71.tar.gz
[rubygems/rubygems] Make helpers raise by default
https://github.com/rubygems/rubygems/commit/ade0c441d5
Diffstat (limited to 'spec/bundler/bundler')
-rw-r--r--spec/bundler/bundler/cli_spec.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/bundler/bundler/cli_spec.rb b/spec/bundler/bundler/cli_spec.rb
index 20b7609466..49e73a6f3e 100644
--- a/spec/bundler/bundler/cli_spec.rb
+++ b/spec/bundler/bundler/cli_spec.rb
@@ -4,12 +4,12 @@ require "bundler/cli"
RSpec.describe "bundle executable" do
it "returns non-zero exit status when passed unrecognized options" do
- bundle "--invalid_argument"
+ bundle "--invalid_argument", :raise_on_error => false
expect(exitstatus).to_not be_zero if exitstatus
end
it "returns non-zero exit status when passed unrecognized task" do
- bundle "unrecognized-task"
+ bundle "unrecognized-task", :raise_on_error => false
expect(exitstatus).to_not be_zero if exitstatus
end
@@ -141,7 +141,7 @@ RSpec.describe "bundle executable" do
describe "printing the outdated warning" do
shared_examples_for "no warning" do
it "prints no warning" do
- bundle "fail", :env => { "BUNDLER_VERSION" => bundler_version }
+ bundle "fail", :env => { "BUNDLER_VERSION" => bundler_version }, :raise_on_error => false
expect(last_command.stdboth).to eq("Could not find command \"fail\".")
end
end
@@ -176,7 +176,7 @@ RSpec.describe "bundle executable" do
context "when the latest version is greater than the current version" do
let(:latest_version) { "222.0" }
it "prints the version warning" do
- bundle "fail", :env => { "BUNDLER_VERSION" => bundler_version }
+ bundle "fail", :env => { "BUNDLER_VERSION" => bundler_version }, :raise_on_error => false
expect(err).to start_with(<<-EOS.strip)
The latest bundler is #{latest_version}, but you are currently running #{bundler_version}.
To install the latest version, run `gem install bundler`
@@ -193,7 +193,7 @@ To install the latest version, run `gem install bundler`
bundle! "config get --parseable foo", :env => { "BUNDLER_VERSION" => bundler_version }
expect(last_command.stdboth).to eq ""
- bundle "platform --ruby", :env => { "BUNDLER_VERSION" => bundler_version }
+ bundle "platform --ruby", :env => { "BUNDLER_VERSION" => bundler_version }, :raise_on_error => false
expect(last_command.stdboth).to eq "Could not locate Gemfile"
end
end
@@ -201,7 +201,7 @@ To install the latest version, run `gem install bundler`
context "and is a pre-release" do
let(:latest_version) { "222.0.0.pre.4" }
it "prints the version warning" do
- bundle "fail", :env => { "BUNDLER_VERSION" => bundler_version }
+ bundle "fail", :env => { "BUNDLER_VERSION" => bundler_version }, :raise_on_error => false
expect(err).to start_with(<<-EOS.strip)
The latest bundler is #{latest_version}, but you are currently running #{bundler_version}.
To install the latest version, run `gem install bundler --pre`