summaryrefslogtreecommitdiff
path: root/spec/support
diff options
context:
space:
mode:
authorSHIBATA Hiroshi <hsbt@ruby-lang.org>2017-09-07 12:39:06 +0900
committerSHIBATA Hiroshi <hsbt@ruby-lang.org>2017-09-07 12:39:06 +0900
commit938bb4753270deb57643d114605134652aa5b5b2 (patch)
tree9da0d1e9e4b6c14ea452f3c155774277015dd392 /spec/support
parent6d9b2753c95d31b583792ff7363020e0083cbeb4 (diff)
downloadbundler-938bb4753270deb57643d114605134652aa5b5b2.tar.gz
Remove `File.expand_path` when it given Pathname object
Diffstat (limited to 'spec/support')
-rw-r--r--spec/support/artifice/endpoint.rb2
-rw-r--r--spec/support/helpers.rb10
2 files changed, 6 insertions, 6 deletions
diff --git a/spec/support/artifice/endpoint.rb b/spec/support/artifice/endpoint.rb
index 210f364a12..0d52130263 100644
--- a/spec/support/artifice/endpoint.rb
+++ b/spec/support/artifice/endpoint.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require File.expand_path("../../path.rb", __FILE__)
-require File.expand_path(Spec::Path.root.join("lib/bundler/deprecate"), __FILE__)
+require Spec::Path.root.join("lib/bundler/deprecate")
include Spec::Path
$LOAD_PATH.unshift(*Dir[Spec::Path.base_system_gems.join("gems/{artifice,rack,tilt,sinatra}-*/lib")].map(&:to_s))
diff --git a/spec/support/helpers.rb b/spec/support/helpers.rb
index ddbc8520a1..3cac274ee8 100644
--- a/spec/support/helpers.rb
+++ b/spec/support/helpers.rb
@@ -88,11 +88,11 @@ module Spec
end
def lib
- File.expand_path(root.join("lib"), __FILE__)
+ root.join("lib")
end
def spec
- File.expand_path(spec_dir.to_s, __FILE__)
+ spec_dir.to_s
end
def bundle(cmd, options = {})
@@ -102,7 +102,7 @@ module Spec
no_color = options.delete("no-color") { cmd.to_s !~ /\A(e|ex|exe|exec|conf|confi|config)(\s|\z)/ }
options["no-color"] = true if no_color
- bundle_bin = options.delete("bundle_bin") || File.expand_path(bindir.join("bundle"), __FILE__)
+ bundle_bin = options.delete("bundle_bin") || bindir.join("bundle")
if system_bundler = options.delete(:system_bundler)
bundle_bin = "-S bundle"
@@ -171,12 +171,12 @@ module Spec
end
def bundler(cmd, options = {})
- options["bundle_bin"] = File.expand_path(bindir.join("bundler"), __FILE__)
+ options["bundle_bin"] = bindir.join("bundler")
bundle(cmd, options)
end
def bundle_ruby(options = {})
- options["bundle_bin"] = File.expand_path(bindir.join("bundle_ruby"), __FILE__)
+ options["bundle_bin"] = bindir.join("bundle_ruby")
bundle("", options)
end