summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2019-02-11 00:17:04 +0100
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2019-02-14 00:46:56 +0100
commit37d6c8c52bc72ac34119e7d3a2652fdf3bfb99f4 (patch)
tree6edcba212e072997f45a74553d3d1d0effe04fbb
parent8ba4916ebc6777104027ecb0d654825ea13824a9 (diff)
downloadbundler-check_out_only_in_specs.tar.gz
-rw-r--r--spec/commands/exec_spec.rb8
-rw-r--r--spec/commands/package_spec.rb2
-rw-r--r--spec/commands/show_spec.rb2
-rw-r--r--spec/install/deploy_spec.rb2
-rw-r--r--spec/install/gemfile/git_spec.rb10
-rw-r--r--spec/install/gemfile/groups_spec.rb6
-rw-r--r--spec/install/gemfile/path_spec.rb6
-rw-r--r--spec/install/gems/flex_spec.rb2
-rw-r--r--spec/install/gems/resolving_spec.rb4
-rw-r--r--spec/install/gemspecs_spec.rb4
-rw-r--r--spec/install/path_spec.rb2
-rw-r--r--spec/lock/lockfile_bundler_1_spec.rb4
-rw-r--r--spec/other/compatibility_guard_spec.rb2
-rw-r--r--spec/realworld/edgecases_spec.rb4
-rw-r--r--spec/runtime/gem_tasks_spec.rb2
-rw-r--r--spec/runtime/inline_spec.rb16
-rw-r--r--spec/runtime/require_spec.rb22
-rw-r--r--spec/runtime/setup_spec.rb42
-rw-r--r--spec/runtime/with_unbundled_env_spec.rb2
-rw-r--r--spec/update/git_spec.rb2
20 files changed, 72 insertions, 72 deletions
diff --git a/spec/commands/exec_spec.rb b/spec/commands/exec_spec.rb
index c66faed8f5..aaba8f2777 100644
--- a/spec/commands/exec_spec.rb
+++ b/spec/commands/exec_spec.rb
@@ -93,14 +93,14 @@ RSpec.describe "bundle exec" do
expect(out).to eq("Ruby version #{RUBY_VERSION} defaults to keeping non-standard file descriptors on Kernel#exec.")
end
- expect(err).to be_empty
+ expect(last_command.stderr).to be_empty
end
it "accepts --keep-file-descriptors" do
install_gemfile ""
bundle "exec --keep-file-descriptors echo foobar"
- expect(err).to be_empty
+ expect(last_command.stderr).to be_empty
end
it "can run a command named --verbose" do
@@ -465,8 +465,8 @@ RSpec.describe "bundle exec" do
bundle "exec irb"
- expect(err).to match("The gemspec at #{lib_path("foo-1.0").join("foo.gemspec")} is not valid")
- expect(err).to match('"TODO" is not a summary')
+ expect(last_command.stderr).to match("The gemspec at #{lib_path("foo-1.0").join("foo.gemspec")} is not valid")
+ expect(last_command.stderr).to match('"TODO" is not a summary')
end
end
diff --git a/spec/commands/package_spec.rb b/spec/commands/package_spec.rb
index 302d30db97..d60660bd34 100644
--- a/spec/commands/package_spec.rb
+++ b/spec/commands/package_spec.rb
@@ -266,7 +266,7 @@ RSpec.describe "bundle install with gem sources" do
end
bundle :install
- expect(err).to be_empty
+ expect(last_command.stderr).to be_empty
expect(the_bundle).to include_gems "rack 1.0"
end
diff --git a/spec/commands/show_spec.rb b/spec/commands/show_spec.rb
index 50288e7696..8f027c5739 100644
--- a/spec/commands/show_spec.rb
+++ b/spec/commands/show_spec.rb
@@ -157,7 +157,7 @@ RSpec.describe "bundle show" do
it "does not output git errors" do
bundle :show
- expect(err).to be_empty
+ expect(last_command.stderr).to eq_err("")
end
end
diff --git a/spec/install/deploy_spec.rb b/spec/install/deploy_spec.rb
index 3c69d29e6f..ca1ba0ae58 100644
--- a/spec/install/deploy_spec.rb
+++ b/spec/install/deploy_spec.rb
@@ -383,7 +383,7 @@ RSpec.describe "install with --deployment or --frozen" do
G
expect(the_bundle).not_to include_gems "rack 1.0.0"
- expect(err).to include strip_whitespace(<<-E).strip
+ expect(last_command.stderr).to include strip_whitespace(<<-E).strip
The dependencies in your gemfile changed
You have added to the Gemfile:
diff --git a/spec/install/gemfile/git_spec.rb b/spec/install/gemfile/git_spec.rb
index 1bcc18bc73..cd8e0f906e 100644
--- a/spec/install/gemfile/git_spec.rb
+++ b/spec/install/gemfile/git_spec.rb
@@ -204,7 +204,7 @@ RSpec.describe "bundle install with git sources" do
gem "foo"
end
G
- expect(err).to be_empty
+ expect(last_command.stderr).to be_empty
run <<-RUBY
require 'foo'
@@ -234,7 +234,7 @@ RSpec.describe "bundle install with git sources" do
gem "foo"
end
G
- expect(err).to be_empty
+ expect(last_command.stderr).to be_empty
run! <<-RUBY
require 'foo'
@@ -270,7 +270,7 @@ RSpec.describe "bundle install with git sources" do
gem "foo"
end
G
- expect(err).to be_empty
+ expect(last_command.stderr).to be_empty
run! <<-RUBY
require 'foo'
@@ -1051,7 +1051,7 @@ RSpec.describe "bundle install with git sources" do
bundle :install,
:requires => [lib_path("install_hooks.rb")]
- expect(err).to eq_err("Ran pre-install hook: foo-1.0")
+ expect(last_command.stderr).to eq_err("Ran pre-install hook: foo-1.0")
end
it "runs post-install hooks" do
@@ -1071,7 +1071,7 @@ RSpec.describe "bundle install with git sources" do
bundle :install,
:requires => [lib_path("install_hooks.rb")]
- expect(err).to eq_err("Ran post-install hook: foo-1.0")
+ expect(last_command.stderr).to eq_err("Ran post-install hook: foo-1.0")
end
it "complains if the install hook fails" do
diff --git a/spec/install/gemfile/groups_spec.rb b/spec/install/gemfile/groups_spec.rb
index 19c379e188..1b739e18ce 100644
--- a/spec/install/gemfile/groups_spec.rb
+++ b/spec/install/gemfile/groups_spec.rb
@@ -25,7 +25,7 @@ RSpec.describe "bundle install with groups" do
puts ACTIVESUPPORT
R
- expect(err).to eq_err("ZOMG LOAD ERROR")
+ expect(last_command.stderr).to eq_err("ZOMG LOAD ERROR")
end
it "installs gems with inline :groups into those groups" do
@@ -36,7 +36,7 @@ RSpec.describe "bundle install with groups" do
puts THIN
R
- expect(err).to eq_err("ZOMG LOAD ERROR")
+ expect(last_command.stderr).to eq_err("ZOMG LOAD ERROR")
end
it "sets up everything if Bundler.setup is used with no groups" do
@@ -57,7 +57,7 @@ RSpec.describe "bundle install with groups" do
puts THIN
RUBY
- expect(err).to eq_err("ZOMG LOAD ERROR")
+ expect(last_command.stderr).to eq_err("ZOMG LOAD ERROR")
end
it "sets up old groups when they have previously been removed" do
diff --git a/spec/install/gemfile/path_spec.rb b/spec/install/gemfile/path_spec.rb
index c1b8527994..17f5471f26 100644
--- a/spec/install/gemfile/path_spec.rb
+++ b/spec/install/gemfile/path_spec.rb
@@ -313,7 +313,7 @@ RSpec.describe "bundle install with explicit source paths" do
install_gemfile <<-G
gem 'foo', '1.0', :path => "#{lib_path("foo-1.0")}"
G
- expect(err).to be_empty
+ expect(last_command.stderr).to be_empty
end
it "removes the .gem file after installing" do
@@ -575,7 +575,7 @@ RSpec.describe "bundle install with explicit source paths" do
bundle :install,
:requires => [lib_path("install_hooks.rb")]
- expect(err).to eq_err("Ran pre-install hook: foo-1.0")
+ expect(last_command.stderr).to eq_err("Ran pre-install hook: foo-1.0")
end
it "runs post-install hooks" do
@@ -595,7 +595,7 @@ RSpec.describe "bundle install with explicit source paths" do
bundle :install,
:requires => [lib_path("install_hooks.rb")]
- expect(err).to eq_err("Ran post-install hook: foo-1.0")
+ expect(last_command.stderr).to eq_err("Ran post-install hook: foo-1.0")
end
it "complains if the install hook fails" do
diff --git a/spec/install/gems/flex_spec.rb b/spec/install/gems/flex_spec.rb
index b4022fd601..12bc2877ff 100644
--- a/spec/install/gems/flex_spec.rb
+++ b/spec/install/gems/flex_spec.rb
@@ -188,7 +188,7 @@ RSpec.describe "bundle flex_install" do
ruby <<-RUBY
require 'bundler/setup'
RUBY
- expect(err).to match(/could not find gem 'rack-obama/i)
+ expect(last_command.stderr).to match(/could not find gem 'rack-obama/i)
end
it "suggests bundle update when the Gemfile requires different versions than the lock" do
diff --git a/spec/install/gems/resolving_spec.rb b/spec/install/gems/resolving_spec.rb
index c8a7cc59ef..0be7a56606 100644
--- a/spec/install/gems/resolving_spec.rb
+++ b/spec/install/gems/resolving_spec.rb
@@ -77,7 +77,7 @@ RSpec.describe "bundle install with install-time dependencies" do
bundle :install, :env => { "DEBUG_RESOLVER" => "1" }
- expect(err).to include("Creating possibility state for net_c")
+ expect(last_command.stderr).to include("Creating possibility state for net_c")
end
end
@@ -91,7 +91,7 @@ RSpec.describe "bundle install with install-time dependencies" do
bundle :install, :env => { "DEBUG_RESOLVER_TREE" => "1" }
- expect(err).to include(" net_b").
+ expect(last_command.stderr).to include(" net_b").
and include("Starting resolution").
and include("Finished resolution").
and include("Attempting to activate")
diff --git a/spec/install/gemspecs_spec.rb b/spec/install/gemspecs_spec.rb
index 7ff1ca70c5..c4cceeefb6 100644
--- a/spec/install/gemspecs_spec.rb
+++ b/spec/install/gemspecs_spec.rb
@@ -15,7 +15,7 @@ RSpec.describe "bundle install" do
gem "yaml_spec"
G
bundle :install
- expect(err).to be_empty
+ expect(last_command.stderr).to be_empty
end
it "still installs correctly when using path" do
@@ -24,7 +24,7 @@ RSpec.describe "bundle install" do
install_gemfile <<-G
gem 'yaml_spec', :path => "#{lib_path("yaml_spec-1.0")}"
G
- expect(err).to be_empty
+ expect(last_command.stderr).to be_empty
end
end
diff --git a/spec/install/path_spec.rb b/spec/install/path_spec.rb
index c722969c80..e6439a2285 100644
--- a/spec/install/path_spec.rb
+++ b/spec/install/path_spec.rb
@@ -226,7 +226,7 @@ RSpec.describe "bundle install" do
vendored_gems("extensions").rmtree
run "require 'very_simple_binary_c'"
- expect(err).to include("Bundler::GemNotFound")
+ expect(last_command.stderr).to include("Bundler::GemNotFound")
bundle :install, forgotten_command_line_options(:path => "./vendor/bundle")
diff --git a/spec/lock/lockfile_bundler_1_spec.rb b/spec/lock/lockfile_bundler_1_spec.rb
index 59cc8fe807..0e89645503 100644
--- a/spec/lock/lockfile_bundler_1_spec.rb
+++ b/spec/lock/lockfile_bundler_1_spec.rb
@@ -291,8 +291,8 @@ RSpec.describe "the lockfile format", :bundler => "< 2" do
G
end
- expect(err).to include("Warning: the lockfile is being updated to Bundler " \
- "9999999, after which you will be unable to return to Bundler 1.")
+ expect(last_command.stderr).to include("Warning: the lockfile is being updated to Bundler " \
+ "9999999, after which you will be unable to return to Bundler 1.")
lockfile_should_be <<-G
GEM
diff --git a/spec/other/compatibility_guard_spec.rb b/spec/other/compatibility_guard_spec.rb
index ac05ebd918..9b11ab4e4f 100644
--- a/spec/other/compatibility_guard_spec.rb
+++ b/spec/other/compatibility_guard_spec.rb
@@ -18,7 +18,7 @@ RSpec.describe "bundler compatibility guard" do
it "raises a friendly error" do
bundle :version
- expect(err).to eq("Bundler 2 requires RubyGems 2.5 or later. Either install bundler 1 or update to a supported RubyGems version.")
+ expect(last_command.stderr).to eq("Bundler 2 requires RubyGems 2.5 or later. Either install bundler 1 or update to a supported RubyGems version.")
end
end
end
diff --git a/spec/realworld/edgecases_spec.rb b/spec/realworld/edgecases_spec.rb
index ae749746a2..8966c3835d 100644
--- a/spec/realworld/edgecases_spec.rb
+++ b/spec/realworld/edgecases_spec.rb
@@ -26,7 +26,7 @@ RSpec.describe "real world edgecases", :realworld => true, :sometimes => true do
gem "linecache", "0.46"
G
bundle :lock
- expect(err).to be_empty
+ expect(last_command.stderr).to be_empty
expect(exitstatus).to eq(0) if exitstatus
end
@@ -241,7 +241,7 @@ RSpec.describe "real world edgecases", :realworld => true, :sometimes => true do
bundle! :install, forgotten_command_line_options(:path => "vendor/bundle")
expect(err).not_to include("Could not find rake")
- expect(err).to be_empty
+ expect(last_command.stderr).to be_empty
end
it "checks out git repos when the lockfile is corrupted" do
diff --git a/spec/runtime/gem_tasks_spec.rb b/spec/runtime/gem_tasks_spec.rb
index de72869dc3..3c69f8a800 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(err).to eq("")
+ expect(last_command.stderr).to eq("")
expected_tasks = [
"rake build",
"rake clean",
diff --git a/spec/runtime/inline_spec.rb b/spec/runtime/inline_spec.rb
index 4c1cc35a4a..96a3fa09ae 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(err).to include "Could not find gem 'eleven'"
+ expect(last_command.stderr).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(err).to be_empty
+ expect(last_command.stderr).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(err).to include "Unknown options: arglebargle"
+ expect(last_command.stderr).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(err).to be_empty
+ expect(last_command.stderr).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(err).to be_empty
+ expect(last_command.stderr).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(err).to be_empty
+ expect(last_command.stderr).to be_empty
expect(exitstatus).to be_zero if exitstatus
end
@@ -240,7 +240,7 @@ RSpec.describe "bundler/inline#gemfile" do
RUBY
end
- expect(err).to be_empty
+ expect(last_command.stderr).to be_empty
expect(exitstatus).to be_zero if exitstatus
end
@@ -258,7 +258,7 @@ RSpec.describe "bundler/inline#gemfile" do
RUBY
end
- expect(err).to be_empty
+ expect(last_command.stderr).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 38c25f1e82..4d8b70082e 100644
--- a/spec/runtime/require_spec.rb
+++ b/spec/runtime/require_spec.rb
@@ -121,7 +121,7 @@ RSpec.describe "Bundler.require" do
Bundler.require
R
- expect(err).to eq_err("ZOMG LOAD ERROR")
+ expect(last_command.stderr).to eq_err("ZOMG LOAD ERROR")
end
it "displays a helpful message if the required gem throws an error" do
@@ -136,8 +136,8 @@ RSpec.describe "Bundler.require" do
G
run "Bundler.require"
- expect(err).to match("error while trying to load the gem 'faulty'")
- expect(err).to match("Gem Internal Error Message")
+ expect(last_command.stderr).to match("error while trying to load the gem 'faulty'")
+ expect(last_command.stderr).to match("Gem Internal Error Message")
end
it "doesn't swallow the error when the library has an unrelated error" do
@@ -160,7 +160,7 @@ RSpec.describe "Bundler.require" do
RUBY
run(cmd)
- expect(err).to eq_err("ZOMG LOAD ERROR: cannot load such file -- load-bar")
+ expect(last_command.stderr).to eq_err("ZOMG LOAD ERROR: cannot load such file -- load-bar")
end
describe "with namespaced gems" do
@@ -198,7 +198,7 @@ RSpec.describe "Bundler.require" do
RUBY
ruby(cmd)
- expect(err).to be_empty
+ expect(last_command.stderr).to be_empty
end
it "does not mangle explicitly given requires" do
@@ -211,7 +211,7 @@ RSpec.describe "Bundler.require" do
load_error_run <<-R, "jquery-rails"
Bundler.require
R
- expect(err).to eq_err("ZOMG LOAD ERROR")
+ expect(last_command.stderr).to eq_err("ZOMG LOAD ERROR")
end
it "handles the case where regex fails" do
@@ -234,7 +234,7 @@ RSpec.describe "Bundler.require" do
RUBY
run(cmd)
- expect(err).to eq_err("ZOMG LOAD ERROR")
+ expect(last_command.stderr).to eq_err("ZOMG LOAD ERROR")
end
it "doesn't swallow the error when the library has an unrelated error" do
@@ -258,7 +258,7 @@ RSpec.describe "Bundler.require" do
RUBY
run(cmd)
- expect(err).to eq_err("ZOMG LOAD ERROR: cannot load such file -- load-bar")
+ expect(last_command.stderr).to eq_err("ZOMG LOAD ERROR: cannot load such file -- load-bar")
end
end
@@ -366,7 +366,7 @@ RSpec.describe "Bundler.require" do
load_error_run <<-R, "no_such_file_omg"
Bundler.require
R
- expect(err).to eq_err("ZOMG LOAD ERROR")
+ expect(last_command.stderr).to eq_err("ZOMG LOAD ERROR")
end
end
end
@@ -432,7 +432,7 @@ RSpec.describe "Bundler.require with platform specific dependencies" do
G
run "Bundler.require"
- expect(err).to be_empty
+ expect(last_command.stderr).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(err).to be_empty
+ expect(last_command.stderr).to be_empty
end
end
diff --git a/spec/runtime/setup_spec.rb b/spec/runtime/setup_spec.rb
index e577b62b5c..b57d61c3a6 100644
--- a/spec/runtime/setup_spec.rb
+++ b/spec/runtime/setup_spec.rb
@@ -16,7 +16,7 @@ RSpec.describe "Bundler.setup" do
require 'rack'
puts RACK
RUBY
- expect(err).to be_empty
+ expect(last_command.stderr).to be_empty
expect(out).to eq("1.0.0")
end
end
@@ -42,7 +42,7 @@ RSpec.describe "Bundler.setup" do
puts "WIN"
end
RUBY
- expect(err).to be_empty
+ expect(last_command.stderr).to be_empty
expect(out).to eq("WIN")
end
@@ -55,7 +55,7 @@ RSpec.describe "Bundler.setup" do
require 'rack'
puts RACK
RUBY
- expect(err).to be_empty
+ expect(last_command.stderr).to be_empty
expect(out).to eq("1.0.0")
end
@@ -69,7 +69,7 @@ RSpec.describe "Bundler.setup" do
require 'rack'
puts RACK
RUBY
- expect(err).to be_empty
+ expect(last_command.stderr).to be_empty
expect(out).to eq("1.0.0")
end
@@ -87,7 +87,7 @@ RSpec.describe "Bundler.setup" do
puts "FAIL"
end
RUBY
- expect(err).to be_empty
+ expect(last_command.stderr).to be_empty
expect(out).to match("WIN")
end
@@ -101,8 +101,8 @@ RSpec.describe "Bundler.setup" do
puts "FAIL"
RUBY
- expect(err).to match("rack")
- expect(err).to match("LoadError")
+ expect(last_command.stderr).to match("rack")
+ expect(last_command.stderr).to match("LoadError")
expect(out).not_to match("FAIL")
end
end
@@ -138,7 +138,7 @@ RSpec.describe "Bundler.setup" do
load_path = out.split("\n")
rack_load_order = load_path.index {|path| path.include?("rack") }
- expect(err).to eq("")
+ expect(last_command.stderr).to eq("")
expect(load_path).to include(a_string_ending_with("dash_i_dir"), "rubylib_dir")
expect(rack_load_order).to be > 0
end
@@ -361,7 +361,7 @@ RSpec.describe "Bundler.setup" do
end
R
- expect(err).to be_empty
+ expect(last_command.stderr).to be_empty
end
it "replaces #gem but raises when the version is wrong" do
@@ -387,7 +387,7 @@ RSpec.describe "Bundler.setup" do
end
R
- expect(err).to be_empty
+ expect(last_command.stderr).to be_empty
end
end
@@ -446,7 +446,7 @@ RSpec.describe "Bundler.setup" do
it "provides a useful exception when the git repo is not checked out yet" do
run "1"
- expect(err).to match(/the git source #{lib_path('rack-1.0.0')} is not yet checked out. Please run `bundle install`/i)
+ 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)
end
it "does not hit the git binary if the lockfile is available and up to date" do
@@ -532,7 +532,7 @@ RSpec.describe "Bundler.setup" do
FileUtils.rm_rf(lib_path("local-rack"))
run "require 'rack'"
- expect(err).to match(/Cannot use local override for rack-0.8 because #{Regexp.escape(lib_path('local-rack').to_s)} does not exist/)
+ 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/)
end
it "explodes if branch is not given on runtime" do
@@ -554,7 +554,7 @@ RSpec.describe "Bundler.setup" do
G
run "require 'rack'"
- expect(err).to match(/because :branch is not specified in Gemfile/)
+ expect(last_command.stderr).to match(/because :branch is not specified in Gemfile/)
end
it "explodes on different branches on runtime" do
@@ -576,7 +576,7 @@ RSpec.describe "Bundler.setup" do
G
run "require 'rack'"
- expect(err).to match(/is using branch master but Gemfile specifies changed/)
+ expect(last_command.stderr).to match(/is using branch master but Gemfile specifies changed/)
end
it "explodes on refs with different branches on runtime" do
@@ -596,7 +596,7 @@ RSpec.describe "Bundler.setup" do
bundle %(config local.rack #{lib_path("local-rack")})
run "require 'rack'"
- expect(err).to match(/is using branch master but Gemfile specifies nonexistant/)
+ expect(last_command.stderr).to match(/is using branch master but Gemfile specifies nonexistant/)
end
end
@@ -701,7 +701,7 @@ RSpec.describe "Bundler.setup" do
end
R
- expect(err).to be_empty
+ expect(last_command.stderr).to be_empty
end
end
end
@@ -764,7 +764,7 @@ end
ENV["GEM_HOME"] = ""
bundle %(exec ruby -e "require 'set'")
- expect(err).to be_empty
+ expect(last_command.stderr).to be_empty
end
describe "$MANPATH" do
@@ -933,7 +933,7 @@ end
require 'foo'
R
end
- expect(err).to be_empty
+ expect(last_command.stderr).to be_empty
end
it "should make sure the Bundler.root is really included in the path relative to the Gemfile" do
@@ -958,7 +958,7 @@ end
R
end
- expect(err).to be_empty
+ expect(last_command.stderr).to be_empty
end
end
@@ -1108,7 +1108,7 @@ end
Bundler.load
RUBY
- expect(err).to be_empty
+ expect(last_command.stderr).to be_empty
expect(out).to eq("")
end
end
@@ -1120,7 +1120,7 @@ end
G
bundle %(exec ruby -e "require 'bundler'; Bundler.setup")
- expect(err).to be_empty
+ expect(last_command.stderr).to be_empty
end
end
diff --git a/spec/runtime/with_unbundled_env_spec.rb b/spec/runtime/with_unbundled_env_spec.rb
index 4e520a6ad6..af608e007c 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(err).to eq <<-EOS.strip
+ expect(last_command.stderr).to eq <<-EOS.strip
2 false
1 true
0 true
diff --git a/spec/update/git_spec.rb b/spec/update/git_spec.rb
index 37621b3552..a09805bef0 100644
--- a/spec/update/git_spec.rb
+++ b/spec/update/git_spec.rb
@@ -88,7 +88,7 @@ RSpec.describe "bundle update" do
gem "foo", "1.0", :git => "#{lib_path("foo_two")}"
G
- expect(err).to be_empty
+ expect(last_command.stderr).to be_empty
expect(out).to include("Fetching #{lib_path}/foo_two")
expect(out).to include("Bundle complete!")
end