diff options
Diffstat (limited to 'spec/bundler/support/matchers.rb')
-rw-r--r-- | spec/bundler/support/matchers.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/bundler/support/matchers.rb b/spec/bundler/support/matchers.rb index f9efe32a38..5d1a6a7919 100644 --- a/spec/bundler/support/matchers.rb +++ b/spec/bundler/support/matchers.rb @@ -133,7 +133,7 @@ module Spec rescue StandardError => e next "#{name} is not installed:\n#{indent(e)}" end - actual_version, actual_platform = last_command.stdout.strip.split(/\s+/, 2) + actual_version, actual_platform = out.strip.split(/\s+/, 2) unless Gem::Version.new(actual_version) == Gem::Version.new(version) next "#{name} was expected to be at version #{version} but was #{actual_version}" end @@ -147,7 +147,7 @@ module Spec rescue StandardError next "#{name} does not have a source defined:\n#{indent(e)}" end - unless last_command.stdout.strip == source + unless out.strip == source next "Expected #{name} (#{version}) to be installed from `#{source}`, was actually from `#{out}`" end end.compact @@ -172,9 +172,9 @@ module Spec rescue StandardError => e next "checking for #{name} failed:\n#{e}" end - next if last_command.stdout == "WIN" + next if out == "WIN" next "expected #{name} to not be installed, but it was" if version.nil? - if Gem::Version.new(last_command.stdout) == Gem::Version.new(version) + if Gem::Version.new(out) == Gem::Version.new(version) next "expected #{name} (#{version}) not to be installed, but it was" end end.compact |