Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Commit

Permalink
Prefer err to last_command.bundler_err
Browse files Browse the repository at this point in the history
Because it takes into account the target stream for errors according to
bundler's version.
  • Loading branch information
deivid-rodriguez committed Feb 27, 2019
1 parent 8c0d37a commit d143d2a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions spec/lock/lockfile_spec.rb
Expand Up @@ -183,7 +183,7 @@
"than the version that created the lockfile (9999999.1.0). " \
"We suggest you to upgrade to the version that created the " \
"lockfile by running `gem install bundler:9999999.1.0`."
expect(last_command.bundler_err).to include warning_message
expect(err).to include warning_message

lockfile_should_be <<-G
GEM
Expand Down Expand Up @@ -226,7 +226,7 @@
G

expect(last_command).to be_failure
expect(last_command.bundler_err).to include("You must use Bundler 9999999 or greater with this lockfile.")
expect(err).to include("You must use Bundler 9999999 or greater with this lockfile.")
end

it "shows a friendly error when running with a new bundler 2 lockfile" do
Expand Down Expand Up @@ -1421,7 +1421,7 @@ def set_lockfile_mtime_to_known_value
gem "rack"
G

expect(last_command.bundler_err).to match(/your Gemfile.lock contains merge conflicts/i)
expect(last_command.bundler_err).to match(/git checkout HEAD -- Gemfile.lock/i)
expect(err).to match(/your Gemfile.lock contains merge conflicts/i)
expect(err).to match(/git checkout HEAD -- Gemfile.lock/i)
end
end

0 comments on commit d143d2a

Please sign in to comment.