зеркало из https://github.com/github/ruby.git
[rubygems/rubygems] Remove unnecessary assertions on exitstatus
Since our helpers now raise by default if the subcommand fails, these will never actually fail and are not necessary. https://github.com/rubygems/rubygems/commit/6153b9321e
This commit is contained in:
Родитель
e2837a77be
Коммит
16823d4a05
|
@ -25,7 +25,6 @@ RSpec.describe "bundle executable" do
|
|||
bundle "testtasks"
|
||||
end
|
||||
|
||||
expect(exitstatus).to be_zero if exitstatus
|
||||
expect(out).to eq("Hello, world")
|
||||
end
|
||||
|
||||
|
|
|
@ -25,7 +25,6 @@ RSpec.describe Bundler, "friendly errors" do
|
|||
bundle :install, :env => { "DEBUG" => "true" }
|
||||
|
||||
expect(err).to include("Failed to load #{home(".gemrc")}")
|
||||
expect(exitstatus).to eq(0) if exitstatus
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -8,7 +8,6 @@ RSpec.describe "bundle check" do
|
|||
G
|
||||
|
||||
bundle :check
|
||||
expect(exitstatus).to eq(0) if exitstatus
|
||||
expect(out).to include("The Gemfile's dependencies are satisfied")
|
||||
end
|
||||
|
||||
|
@ -272,7 +271,6 @@ RSpec.describe "bundle check" do
|
|||
it "returns success when the Gemfile is satisfied" do
|
||||
bundle :install
|
||||
bundle :check
|
||||
expect(exitstatus).to eq(0) if exitstatus
|
||||
expect(out).to include("The Gemfile's dependencies are satisfied")
|
||||
end
|
||||
|
||||
|
|
|
@ -315,7 +315,6 @@ RSpec.describe "bundle clean" do
|
|||
bundle "install"
|
||||
|
||||
bundle :clean
|
||||
expect(exitstatus).to eq(0) if exitstatus
|
||||
end
|
||||
|
||||
it "displays an error when used without --path" do
|
||||
|
@ -623,7 +622,6 @@ RSpec.describe "bundle clean" do
|
|||
|
||||
sys_exec "foo"
|
||||
|
||||
expect(exitstatus).to eq(0) if exitstatus
|
||||
expect(out).to eq("1.0")
|
||||
end
|
||||
|
||||
|
|
|
@ -24,8 +24,6 @@ RSpec.describe "bundle doctor" do
|
|||
|
||||
it "succeeds on a sane installation" do
|
||||
bundle :doctor
|
||||
|
||||
expect(exitstatus).to eq(0)
|
||||
end
|
||||
|
||||
context "when all files in home are readable/writable" do
|
||||
|
|
|
@ -38,7 +38,6 @@ RSpec.describe "bundle help" do
|
|||
bundle "help testtasks"
|
||||
end
|
||||
|
||||
expect(exitstatus).to be_zero if exitstatus
|
||||
expect(out).to eq("--help")
|
||||
end
|
||||
|
||||
|
|
|
@ -420,7 +420,6 @@ RSpec.describe "bundle install with gem sources" do
|
|||
|
||||
gem 'foo'
|
||||
G
|
||||
expect(exitstatus).to eq(0) if exitstatus
|
||||
end
|
||||
|
||||
it "doesn't blow up when the global .bundle/config is empty" do
|
||||
|
@ -432,7 +431,6 @@ RSpec.describe "bundle install with gem sources" do
|
|||
|
||||
gem 'foo'
|
||||
G
|
||||
expect(exitstatus).to eq(0) if exitstatus
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -517,8 +515,6 @@ RSpec.describe "bundle install with gem sources" do
|
|||
end
|
||||
|
||||
bundle :install, :dir => root_dir
|
||||
|
||||
expect(exitstatus).to eq(0) if exitstatus
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -73,8 +73,6 @@ RSpec.describe "bundle outdated" do
|
|||
|
||||
it "returns success exit status if no outdated gems present" do
|
||||
bundle "outdated"
|
||||
|
||||
expect(exitstatus).to be_zero if exitstatus
|
||||
end
|
||||
|
||||
it "adds gem group to dependency output when repo is updated" do
|
||||
|
|
|
@ -912,7 +912,6 @@ RSpec.describe "bundle install with git sources" do
|
|||
|
||||
bundle "install"
|
||||
bundle "install"
|
||||
expect(exitstatus).to eq(0) if exitstatus
|
||||
end
|
||||
|
||||
it "prints a friendly error if a file blocks the git repo" do
|
||||
|
@ -1358,7 +1357,6 @@ In Gemfile:
|
|||
end
|
||||
G
|
||||
|
||||
expect(exitstatus).to eq(0) if exitstatus
|
||||
expect(ENV["GIT_DIR"]).to eq("bar")
|
||||
expect(ENV["GIT_WORK_TREE"]).to eq("bar")
|
||||
end
|
||||
|
|
|
@ -133,7 +133,6 @@ RSpec.describe "bundle install with explicit source paths" do
|
|||
|
||||
bundle "config --local frozen true"
|
||||
bundle :install
|
||||
expect(exitstatus).to eq(0) if exitstatus
|
||||
end
|
||||
|
||||
it "installs dependencies from the path even if a newer gem is available elsewhere" do
|
||||
|
@ -421,7 +420,6 @@ RSpec.describe "bundle install with explicit source paths" do
|
|||
install_gemfile <<-G
|
||||
gem "bar", "1.0.0", path: "vendor/bar", require: "bar/nyard"
|
||||
G
|
||||
expect(exitstatus).to eq(0) if exitstatus
|
||||
end
|
||||
|
||||
context "existing lockfile" do
|
||||
|
|
|
@ -349,7 +349,6 @@ RSpec.describe "bundle install with platform conditionals" do
|
|||
G
|
||||
|
||||
bundle :list
|
||||
expect(exitstatus).to eq(0) if exitstatus
|
||||
end
|
||||
|
||||
it "does not attempt to install gems from :rbx when using --local" do
|
||||
|
|
|
@ -22,7 +22,6 @@ RSpec.describe "ruby requirement" do
|
|||
gem "rack-obama"
|
||||
G
|
||||
|
||||
expect(exitstatus).to eq(0) if exitstatus
|
||||
expect(the_bundle).to include_gems "rack-obama 1.0"
|
||||
end
|
||||
|
||||
|
|
|
@ -773,8 +773,6 @@ The checksum of /versions does not match the checksum provided by the server! So
|
|||
G
|
||||
|
||||
bundle :install, :artifice => "compact_index_forbidden"
|
||||
|
||||
expect(exitstatus).to eq(0) if exitstatus
|
||||
ensure
|
||||
home(".gemrc").rmtree
|
||||
end
|
||||
|
|
|
@ -747,8 +747,6 @@ RSpec.describe "gemcutter's dependency API" do
|
|||
G
|
||||
|
||||
bundle "install", :artifice => "endpoint_marshal_fail"
|
||||
|
||||
expect(exitstatus).to eq(0) if exitstatus
|
||||
ensure
|
||||
home(".gemrc").rmtree
|
||||
end
|
||||
|
|
|
@ -21,6 +21,5 @@ RSpec.describe "bundle install with win32-generated lockfile" do
|
|||
|
||||
gem "rack"
|
||||
G
|
||||
expect(exitstatus).to eq(0) if exitstatus
|
||||
end
|
||||
end
|
||||
|
|
|
@ -18,7 +18,6 @@ RSpec.describe "policies with unsigned gems" do
|
|||
it "will work after you try to deploy without a lock" do
|
||||
bundle "install --deployment", :raise_on_error => false
|
||||
bundle :install
|
||||
expect(exitstatus).to eq(0) if exitstatus
|
||||
expect(the_bundle).to include_gems "rack 1.0", "signed_gem 1.0"
|
||||
end
|
||||
|
||||
|
@ -39,7 +38,6 @@ RSpec.describe "policies with unsigned gems" do
|
|||
|
||||
it "will succeed with no policy" do
|
||||
bundle "install"
|
||||
expect(exitstatus).to eq(0) if exitstatus
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -64,13 +62,11 @@ RSpec.describe "policies with signed gems and no CA" do
|
|||
|
||||
it "will succeed with Low Security setting, low security accepts self signed gem" do
|
||||
bundle "install --trust-policy=LowSecurity"
|
||||
expect(exitstatus).to eq(0) if exitstatus
|
||||
expect(the_bundle).to include_gems "signed_gem 1.0"
|
||||
end
|
||||
|
||||
it "will succeed with no policy" do
|
||||
bundle "install"
|
||||
expect(exitstatus).to eq(0) if exitstatus
|
||||
expect(the_bundle).to include_gems "signed_gem 1.0"
|
||||
end
|
||||
end
|
||||
|
|
|
@ -387,7 +387,6 @@ G
|
|||
G
|
||||
|
||||
bundle :check
|
||||
expect(exitstatus).to eq(0) if exitstatus
|
||||
expect(out).to match(/\AResolving dependencies\.\.\.\.*\nThe Gemfile's dependencies are satisfied\z/)
|
||||
end
|
||||
|
||||
|
@ -405,7 +404,6 @@ G
|
|||
G
|
||||
|
||||
bundle :check
|
||||
expect(exitstatus).to eq(0) if exitstatus
|
||||
expect(out).to match(/\AResolving dependencies\.\.\.\.*\nThe Gemfile's dependencies are satisfied\z/)
|
||||
end
|
||||
|
||||
|
|
|
@ -163,7 +163,6 @@ RSpec.describe "Running bin/* commands" do
|
|||
# run binstub for non default Gemfile
|
||||
gembin "foo"
|
||||
|
||||
expect(exitstatus).to eq(0) if exitstatus
|
||||
expect(out).to eq("1.0")
|
||||
end
|
||||
end
|
||||
|
|
|
@ -41,7 +41,6 @@ RSpec.describe "require 'bundler/gem_tasks'" do
|
|||
]
|
||||
tasks = out.lines.to_a.map {|s| s.split("#").first.strip }
|
||||
expect(tasks & expected_tasks).to eq(expected_tasks)
|
||||
expect(exitstatus).to eq(0) if exitstatus
|
||||
end
|
||||
|
||||
it "defines a working `rake install` task", :ruby_repo do
|
||||
|
|
|
@ -57,7 +57,6 @@ RSpec.describe "bundler/inline#gemfile" do
|
|||
RUBY
|
||||
|
||||
expect(out).to eq("two")
|
||||
expect(exitstatus).to be_zero if exitstatus
|
||||
|
||||
script <<-RUBY, :raise_on_error => false
|
||||
gemfile do
|
||||
|
@ -80,7 +79,6 @@ RSpec.describe "bundler/inline#gemfile" do
|
|||
RUBY
|
||||
|
||||
expect(out).to include("Rack's post install message")
|
||||
expect(exitstatus).to be_zero if exitstatus
|
||||
|
||||
script <<-RUBY, :artifice => "endpoint"
|
||||
gemfile(true) do
|
||||
|
@ -93,7 +91,6 @@ RSpec.describe "bundler/inline#gemfile" do
|
|||
err_lines = err.split("\n")
|
||||
err_lines.reject!{|line| line =~ /\.rb:\d+: warning: / } unless RUBY_VERSION < "2.7"
|
||||
expect(err_lines).to be_empty
|
||||
expect(exitstatus).to be_zero if exitstatus
|
||||
end
|
||||
|
||||
it "lets me use my own ui object" do
|
||||
|
@ -113,7 +110,6 @@ RSpec.describe "bundler/inline#gemfile" do
|
|||
RUBY
|
||||
|
||||
expect(out).to eq("CONFIRMED!\nCONFIRMED!")
|
||||
expect(exitstatus).to be_zero if exitstatus
|
||||
end
|
||||
|
||||
it "has an option for quiet installation" do
|
||||
|
@ -155,7 +151,6 @@ RSpec.describe "bundler/inline#gemfile" do
|
|||
RUBY
|
||||
|
||||
expect(out).to match("OKAY")
|
||||
expect(exitstatus).to be_zero if exitstatus
|
||||
end
|
||||
|
||||
it "installs quietly if necessary when the install option is not set" do
|
||||
|
@ -170,7 +165,6 @@ RSpec.describe "bundler/inline#gemfile" do
|
|||
|
||||
expect(out).to eq("1.0.0")
|
||||
expect(err).to be_empty
|
||||
expect(exitstatus).to be_zero if exitstatus
|
||||
end
|
||||
|
||||
it "installs quietly from git if necessary when the install option is not set" do
|
||||
|
@ -188,7 +182,6 @@ RSpec.describe "bundler/inline#gemfile" do
|
|||
|
||||
expect(out).to eq("1.0.0\n2.0.0")
|
||||
expect(err).to be_empty
|
||||
expect(exitstatus).to be_zero if exitstatus
|
||||
end
|
||||
|
||||
it "allows calling gemfile twice" do
|
||||
|
@ -208,7 +201,6 @@ RSpec.describe "bundler/inline#gemfile" do
|
|||
|
||||
expect(out).to eq("two\nfour")
|
||||
expect(err).to be_empty
|
||||
expect(exitstatus).to be_zero if exitstatus
|
||||
end
|
||||
|
||||
it "installs inline gems when a Gemfile.lock is present" do
|
||||
|
@ -243,7 +235,6 @@ RSpec.describe "bundler/inline#gemfile" do
|
|||
RUBY
|
||||
|
||||
expect(err).to be_empty
|
||||
expect(exitstatus).to be_zero if exitstatus
|
||||
end
|
||||
|
||||
it "installs inline gems when frozen is set" do
|
||||
|
@ -257,7 +248,6 @@ RSpec.describe "bundler/inline#gemfile" do
|
|||
RUBY
|
||||
|
||||
expect(last_command.stderr).to be_empty
|
||||
expect(exitstatus).to be_zero if exitstatus
|
||||
end
|
||||
|
||||
it "installs inline gems when BUNDLE_GEMFILE is set to an empty string" do
|
||||
|
@ -273,7 +263,6 @@ RSpec.describe "bundler/inline#gemfile" do
|
|||
RUBY
|
||||
|
||||
expect(err).to be_empty
|
||||
expect(exitstatus).to be_zero if exitstatus
|
||||
end
|
||||
|
||||
it "installs inline gems when BUNDLE_BIN is set" do
|
||||
|
|
|
@ -112,7 +112,6 @@ RSpec.describe "bundle update" do
|
|||
G
|
||||
|
||||
bundle "update", :all => true
|
||||
expect(exitstatus).to eq(0) if exitstatus
|
||||
end
|
||||
|
||||
describe "with submodules" do
|
||||
|
|
Загрузка…
Ссылка в новой задаче