summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2016-11-27 13:53:15 -0500
committerSamuel Giddins <segiddins@segiddins.me>2016-12-21 18:02:09 +0100
commite3f6642127bcb79fcf9e2ed6cabf976d14ab1cc1 (patch)
treeda246f7c4c5651f5eaeddb3b44d800f8b4a36c57
parent064d443c5604415059ac96b53cd3c23e31ca48e8 (diff)
downloadbundler-e3f6642127bcb79fcf9e2ed6cabf976d14ab1cc1.tar.gz
Use the bundle helper when calling bundle_ruby
-rw-r--r--spec/support/helpers.rb14
1 files changed, 2 insertions, 12 deletions
diff --git a/spec/support/helpers.rb b/spec/support/helpers.rb
index c055fad7b2..2f399052f2 100644
--- a/spec/support/helpers.rb
+++ b/spec/support/helpers.rb
@@ -119,18 +119,8 @@ module Spec
end
def bundle_ruby(options = {})
- options["no-color"] = true unless options.key?("no-color")
-
- bundle_bin = File.expand_path("../../../exe/bundle_ruby", __FILE__)
-
- requires = options.delete(:requires) || []
- requires << File.expand_path("../artifice/" + options.delete(:artifice) + ".rb", __FILE__) if options.key?(:artifice)
- requires_str = requires.map {|r| "-r#{r}" }.join(" ")
-
- env = (options.delete(:env) || {}).map {|k, v| "#{k}='#{v}' " }.join
- cmd = "#{env}#{Gem.ruby} -I#{lib} #{requires_str} #{bundle_bin}"
-
- sys_exec(cmd) {|i, o, thr| yield i, o, thr if block_given? }
+ options["bundle_bin"] = File.expand_path("../../../exe/bundle_ruby", __FILE__)
+ bundle("", options)
end
def ruby(ruby, options = {})