aboutsummaryrefslogtreecommitdiffstats
path: root/spec/spec_helper.rb
diff options
context:
space:
mode:
authorNick LaMuro <nicklamuro@gmail.com>2016-07-25 16:25:13 -0500
committerNick LaMuro <nicklamuro@gmail.com>2016-07-25 16:25:13 -0500
commit55cedfaa4b6b2f02ec3ca32af6e259741e24bb01 (patch)
treef9e889e00176551f74336937f89f35c50c6c5303 /spec/spec_helper.rb
parent2a138ed736b2210a21588db44b567dbdea6f7a18 (diff)
downloadbundler-55cedfaa4b6b2f02ec3ca32af6e259741e24bb01.tar.gz
Find git version in spec helper with git_proxy
This is minor, but duplicated code that also can be found in `lib/bundler/source/git/git_proxy.rb`, so lets use that so we are finding the git version in the same manner. Bundler is fully loaded in the spec helper anyway, so this is already available to be used.
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r--spec/spec_helper.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index a9266bf8..05cd4300 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -74,9 +74,11 @@ RSpec.configure do |config|
config.filter_run_excluding :realworld => true
end
+ git_version = Bundler::Source::Git::GitProxy.new(nil, nil, nil).version
+
config.filter_run_excluding :ruby => LessThanProc.with(RUBY_VERSION)
config.filter_run_excluding :rubygems => LessThanProc.with(Gem::VERSION)
- config.filter_run_excluding :git => LessThanProc.with(`git --version`.gsub("git version", "").strip)
+ config.filter_run_excluding :git => LessThanProc.with(git_version)
config.filter_run_excluding :rubygems_master => (ENV["RGV"] != "master")
config.filter_run :focused => true unless ENV["CI"]