spec/spec_helper.rb in mrjoy-bundler-audit-0.3.2 vs spec/spec_helper.rb in mrjoy-bundler-audit-0.3.3
- old
+ new
@@ -1,9 +1,17 @@
-require 'simplecov'
-require 'json'
-SimpleCov.start
+require 'rubygems'
+require 'bundler'
+Bundler.require(:default, :development, :test)
+version = RUBY_VERSION.split(/\./).map(&:to_i)
+if((version[0] == 1 && version[1] >= 9) || (version[0] >= 2))
+ require 'simplecov'
+ require 'json'
+ SimpleCov.start
+end
+
require 'rspec'
+require 'bundler/audit'
require 'bundler/audit/version'
module Helpers
def sh(command, options={})
Bundler.with_clean_env do