diff options
author | Samuel Giddins <segiddins@segiddins.me> | 2016-07-05 12:12:16 -0300 |
---|---|---|
committer | Samuel Giddins <segiddins@segiddins.me> | 2016-07-05 15:11:19 -0300 |
commit | 6b7cc7242de88184c8d5c40c6e4af546935530d3 (patch) | |
tree | a53e54dbf9d1068d96f0b2949ce18caa4fbeb4f9 | |
parent | 913a36458bdbe388a28c56cefcebee26265e4761 (diff) | |
download | bundler-6b7cc7242de88184c8d5c40c6e4af546935530d3.tar.gz |
[Matchers] Allow should_be_installed to work with major deprecations
-rw-r--r-- | spec/support/matchers.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/spec/support/matchers.rb b/spec/support/matchers.rb index ac91874cfa..10e47691ab 100644 --- a/spec/support/matchers.rb +++ b/spec/support/matchers.rb @@ -59,7 +59,8 @@ module Spec version_const = name == "bundler" ? "Bundler::VERSION" : Spec::Builders.constantize(name) run! "require '#{name}.rb'; puts #{version_const}", *groups expect(out).not_to be_empty, "#{name} is not installed" - actual_version, actual_platform = out.split(/\s+/, 2) + out.gsub!(/#{MAJOR_DEPRECATION}.*$/, "") + actual_version, actual_platform = out.strip.split(/\s+/, 2) expect(Gem::Version.new(actual_version)).to eq(Gem::Version.new(version)) expect(actual_platform).to eq(platform) end |