From 0ac756e2df5f38c9fbed9e4aebd45102e6ec1d5b Mon Sep 17 00:00:00 2001 From: Samuel Giddins Date: Tue, 20 Jun 2017 09:56:54 -0500 Subject: Avoid warnings in the specs on Ruby 1.8.7 --- bundler.gemspec | 2 +- spec/spec_helper.rb | 9 +-------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/bundler.gemspec b/bundler.gemspec index f5c459eaed..a2283d6caa 100644 --- a/bundler.gemspec +++ b/bundler.gemspec @@ -35,7 +35,7 @@ Gem::Specification.new do |s| s.add_development_dependency "rake", "~> 10.0" s.add_development_dependency "rdiscount", "~> 2.2" s.add_development_dependency "ronn", "~> 0.7.3" - s.add_development_dependency "rspec", "~> 3.5" + s.add_development_dependency "rspec", "~> 3.6" s.files = `git ls-files -z`.split("\x0").reject {|f| f.match(%r{^(test|spec|features)/}) } # we don't check in man pages, but we need to ship them because diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 782cffc1d1..e22cf00137 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -36,6 +36,7 @@ else end Dir["#{File.expand_path("../support", __FILE__)}/*.rb"].each do |file| + file = file.gsub(%r{\A#{Regexp.escape File.expand_path("..", __FILE__)}/}, "") require file unless file.end_with?("hax.rb") end @@ -104,14 +105,6 @@ RSpec.configure do |config| config.before :all do build_repo1 - # HACK: necessary until rspec-mocks > 3.5.0 is used - # see https://github.com/bundler/bundler/pull/5363#issuecomment-278089256 - if RUBY_VERSION < "1.9" - FileUtils.module_eval do - alias_method :mkpath, :mkdir_p - module_function :mkpath - end - end end config.before :each do -- cgit v1.2.1