From 507ea45c54177c823ab17df70f87e86fd1d1a1b7 Mon Sep 17 00:00:00 2001 From: Andre Arko Date: Sun, 23 Aug 2015 02:11:58 -0700 Subject: try to install test system gems if missing --- spec/support/builders.rb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/spec/support/builders.rb b/spec/support/builders.rb index dd54d765b0..fe9b2ba4d7 100644 --- a/spec/support/builders.rb +++ b/spec/support/builders.rb @@ -298,12 +298,20 @@ module Spec def build_repo(path, &blk) return if File.directory?(path) rake_path = Dir["#{Path.base_system_gems}/**/rake*.gem"].first + + if rake_path.nil? + Spec::Path.base_system_gems.rmtree + Spec::Rubygems.setup + rake_path = Dir["#{Path.base_system_gems}/**/rake*.gem"].first + end + if rake_path FileUtils.mkdir_p("#{path}/gems") FileUtils.cp rake_path, "#{path}/gems/" else - abort "You need to `rm -rf #{tmp}`" + abort "Your test gems are missing! Run `rm -rf #{tmp}` and try again." end + update_repo(path, &blk) end -- cgit v1.2.1