diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-04-12 10:46:15 +0200 |
---|---|---|
committer | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-04-12 10:47:39 +0200 |
commit | d5af877b6a51e0faaa6240089005ccca76dba727 (patch) | |
tree | cf04eaf8b3e3078d21703e7941bb99c9b1be3302 /spec/runtime | |
parent | eb46c21d28193e1fc40aad1ab1316479f59f4515 (diff) | |
download | bundler-d5af877b6a51e0faaa6240089005ccca76dba727.tar.gz |
s/last_command.stderr/err/
Diffstat (limited to 'spec/runtime')
-rw-r--r-- | spec/runtime/gem_tasks_spec.rb | 2 | ||||
-rw-r--r-- | spec/runtime/inline_spec.rb | 16 | ||||
-rw-r--r-- | spec/runtime/require_spec.rb | 10 | ||||
-rw-r--r-- | spec/runtime/setup_spec.rb | 44 | ||||
-rw-r--r-- | spec/runtime/with_unbundled_env_spec.rb | 2 |
5 files changed, 37 insertions, 37 deletions
diff --git a/spec/runtime/gem_tasks_spec.rb b/spec/runtime/gem_tasks_spec.rb index 3c69f8a800..de72869dc3 100644 --- a/spec/runtime/gem_tasks_spec.rb +++ b/spec/runtime/gem_tasks_spec.rb @@ -22,7 +22,7 @@ RSpec.describe "require 'bundler/gem_tasks'", :ruby_repo do sys_exec "#{rake} -T" end - expect(last_command.stderr).to eq("") + expect(err).to eq("") expected_tasks = [ "rake build", "rake clean", diff --git a/spec/runtime/inline_spec.rb b/spec/runtime/inline_spec.rb index 96a3fa09ae..4c1cc35a4a 100644 --- a/spec/runtime/inline_spec.rb +++ b/spec/runtime/inline_spec.rb @@ -67,7 +67,7 @@ RSpec.describe "bundler/inline#gemfile" do puts "success" RUBY - expect(last_command.stderr).to include "Could not find gem 'eleven'" + expect(err).to include "Could not find gem 'eleven'" expect(out).not_to include "success" script <<-RUBY @@ -90,7 +90,7 @@ RSpec.describe "bundler/inline#gemfile" do expect(out).to include("Installing activesupport") err.gsub! %r{.*lib/sinatra/base\.rb:\d+: warning: constant ::Fixnum is deprecated$}, "" err.strip! - expect(last_command.stderr).to be_empty + expect(err).to be_empty expect(exitstatus).to be_zero if exitstatus end @@ -134,7 +134,7 @@ RSpec.describe "bundler/inline#gemfile" do puts "success" RUBY - expect(last_command.stderr).to include "Unknown options: arglebargle" + expect(err).to include "Unknown options: arglebargle" expect(out).not_to include "success" end @@ -165,7 +165,7 @@ RSpec.describe "bundler/inline#gemfile" do RUBY expect(out).to eq("1.0.0") - expect(last_command.stderr).to be_empty + expect(err).to be_empty expect(exitstatus).to be_zero if exitstatus end @@ -183,7 +183,7 @@ RSpec.describe "bundler/inline#gemfile" do RUBY expect(out).to eq("1.0.0\n2.0.0") - expect(last_command.stderr).to be_empty + expect(err).to be_empty expect(exitstatus).to be_zero if exitstatus end @@ -203,7 +203,7 @@ RSpec.describe "bundler/inline#gemfile" do RUBY expect(out).to eq("two\nfour") - expect(last_command.stderr).to be_empty + expect(err).to be_empty expect(exitstatus).to be_zero if exitstatus end @@ -240,7 +240,7 @@ RSpec.describe "bundler/inline#gemfile" do RUBY end - expect(last_command.stderr).to be_empty + expect(err).to be_empty expect(exitstatus).to be_zero if exitstatus end @@ -258,7 +258,7 @@ RSpec.describe "bundler/inline#gemfile" do RUBY end - expect(last_command.stderr).to be_empty + expect(err).to be_empty expect(exitstatus).to be_zero if exitstatus end diff --git a/spec/runtime/require_spec.rb b/spec/runtime/require_spec.rb index c9cfa199d3..f149c9d489 100644 --- a/spec/runtime/require_spec.rb +++ b/spec/runtime/require_spec.rb @@ -136,8 +136,8 @@ RSpec.describe "Bundler.require" do G run "Bundler.require" - expect(last_command.stderr).to match("error while trying to load the gem 'faulty'") - expect(last_command.stderr).to match("Gem Internal Error Message") + expect(err).to match("error while trying to load the gem 'faulty'") + expect(err).to match("Gem Internal Error Message") end it "doesn't swallow the error when the library has an unrelated error" do @@ -198,7 +198,7 @@ RSpec.describe "Bundler.require" do RUBY ruby(cmd) - expect(last_command.stderr).to be_empty + expect(err).to be_empty end it "does not mangle explicitly given requires" do @@ -432,7 +432,7 @@ RSpec.describe "Bundler.require with platform specific dependencies" do G run "Bundler.require" - expect(last_command.stderr).to be_empty + expect(err).to be_empty end it "requires gems pinned to multiple platforms, including the current one" do @@ -447,6 +447,6 @@ RSpec.describe "Bundler.require with platform specific dependencies" do run "Bundler.require; puts RACK" expect(out).to eq("1.0.0") - expect(last_command.stderr).to be_empty + expect(err).to be_empty end end diff --git a/spec/runtime/setup_spec.rb b/spec/runtime/setup_spec.rb index c81baa34ea..3aba1efa6d 100644 --- a/spec/runtime/setup_spec.rb +++ b/spec/runtime/setup_spec.rb @@ -19,7 +19,7 @@ RSpec.describe "Bundler.setup" do require 'rack' puts RACK RUBY - expect(last_command.stderr).to be_empty + expect(err).to be_empty expect(out).to eq("1.0.0") end end @@ -45,7 +45,7 @@ RSpec.describe "Bundler.setup" do puts "WIN" end RUBY - expect(last_command.stderr).to be_empty + expect(err).to be_empty expect(out).to eq("WIN") end @@ -58,7 +58,7 @@ RSpec.describe "Bundler.setup" do require 'rack' puts RACK RUBY - expect(last_command.stderr).to be_empty + expect(err).to be_empty expect(out).to eq("1.0.0") end @@ -72,7 +72,7 @@ RSpec.describe "Bundler.setup" do require 'rack' puts RACK RUBY - expect(last_command.stderr).to be_empty + expect(err).to be_empty expect(out).to eq("1.0.0") end @@ -90,7 +90,7 @@ RSpec.describe "Bundler.setup" do puts "FAIL" end RUBY - expect(last_command.stderr).to be_empty + expect(err).to be_empty expect(out).to match("WIN") end @@ -104,8 +104,8 @@ RSpec.describe "Bundler.setup" do puts "FAIL" RUBY - expect(last_command.stderr).to match("rack") - expect(last_command.stderr).to match("LoadError") + expect(err).to match("rack") + expect(err).to match("LoadError") expect(out).not_to match("FAIL") end end @@ -141,7 +141,7 @@ RSpec.describe "Bundler.setup" do load_path = out.split("\n") rack_load_order = load_path.index {|path| path.include?("rack") } - expect(last_command.stderr).to eq("") + expect(err).to eq("") expect(load_path).to include(a_string_ending_with("dash_i_dir"), "rubylib_dir") expect(rack_load_order).to be > 0 end @@ -364,7 +364,7 @@ RSpec.describe "Bundler.setup" do end R - expect(last_command.stderr).to be_empty + expect(err).to be_empty end it "replaces #gem but raises when the version is wrong" do @@ -390,7 +390,7 @@ RSpec.describe "Bundler.setup" do end R - expect(last_command.stderr).to be_empty + expect(err).to be_empty end end @@ -449,7 +449,7 @@ RSpec.describe "Bundler.setup" do it "provides a useful exception when the git repo is not checked out yet" do run "1" - expect(last_command.stderr).to match(/the git source #{lib_path('rack-1.0.0')} is not yet checked out. Please run `bundle install`/i) + expect(err).to match(/the git source #{lib_path('rack-1.0.0')} is not yet checked out. Please run `bundle install`/i) end it "does not hit the git binary if the lockfile is available and up to date" do @@ -535,7 +535,7 @@ RSpec.describe "Bundler.setup" do FileUtils.rm_rf(lib_path("local-rack")) run "require 'rack'" - expect(last_command.stderr).to match(/Cannot use local override for rack-0.8 because #{Regexp.escape(lib_path('local-rack').to_s)} does not exist/) + 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 it "explodes if branch is not given on runtime" do @@ -557,7 +557,7 @@ RSpec.describe "Bundler.setup" do G run "require 'rack'" - expect(last_command.stderr).to match(/because :branch is not specified in Gemfile/) + expect(err).to match(/because :branch is not specified in Gemfile/) end it "explodes on different branches on runtime" do @@ -579,7 +579,7 @@ RSpec.describe "Bundler.setup" do G run "require 'rack'" - expect(last_command.stderr).to match(/is using branch master but Gemfile specifies changed/) + expect(err).to match(/is using branch master but Gemfile specifies changed/) end it "explodes on refs with different branches on runtime" do @@ -599,7 +599,7 @@ RSpec.describe "Bundler.setup" do bundle %(config set local.rack #{lib_path("local-rack")}) run "require 'rack'" - expect(last_command.stderr).to match(/is using branch master but Gemfile specifies nonexistant/) + expect(err).to match(/is using branch master but Gemfile specifies nonexistant/) end end @@ -711,7 +711,7 @@ end ENV["GEM_HOME"] = "" bundle %(exec ruby -e "require 'set'") - expect(last_command.stderr).to be_empty + expect(err).to be_empty end describe "$MANPATH" do @@ -878,7 +878,7 @@ end require 'foo' R end - expect(last_command.stderr).to be_empty + expect(err).to be_empty end it "should make sure the Bundler.root is really included in the path relative to the Gemfile" do @@ -903,7 +903,7 @@ end R end - expect(last_command.stderr).to be_empty + expect(err).to be_empty end end @@ -1053,7 +1053,7 @@ end Bundler.load RUBY - expect(last_command.stderr).to be_empty + expect(err).to be_empty expect(out).to eq("") end end @@ -1065,7 +1065,7 @@ end G bundle %(exec ruby -e "require 'bundler'; Bundler.setup") - expect(last_command.stderr).to be_empty + expect(err).to be_empty end end @@ -1355,7 +1355,7 @@ end RUBY expect(last_command.stdboth).not_to include "FAIL" - expect(last_command.stderr).to include "private method `gem'" + expect(err).to include "private method `gem'" end it "keeps Kernel#require private" do @@ -1371,7 +1371,7 @@ end RUBY expect(last_command.stdboth).not_to include "FAIL" - expect(last_command.stderr).to include "private method `require'" + expect(err).to include "private method `require'" end end end diff --git a/spec/runtime/with_unbundled_env_spec.rb b/spec/runtime/with_unbundled_env_spec.rb index b4503cba32..69a0dd731f 100644 --- a/spec/runtime/with_unbundled_env_spec.rb +++ b/spec/runtime/with_unbundled_env_spec.rb @@ -46,7 +46,7 @@ RSpec.describe "Bundler.with_env helpers" do build_bundler_context bundle! "exec '#{Gem.ruby}' #{bundled_app("exe.rb")} 2" end - expect(last_command.stderr).to eq <<-EOS.strip + expect(err).to eq <<-EOS.strip 2 false 1 true 0 true |