summaryrefslogtreecommitdiff
path: root/spec/quality_spec.rb
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2020-01-12 17:36:08 +0100
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2020-01-12 17:38:13 +0100
commit55630c23f4e0683e820116af917888cf23569020 (patch)
tree9e36f597cd3a41a727506f930b49499cd0d0bd0b /spec/quality_spec.rb
parent58bec9e2911fdc43187854ea225060ccdb4eb38a (diff)
downloadbundler-55630c23f4e0683e820116af917888cf23569020.tar.gz
Make warnings spec independent of LOAD_PATH
Diffstat (limited to 'spec/quality_spec.rb')
-rw-r--r--spec/quality_spec.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/quality_spec.rb b/spec/quality_spec.rb
index c6438817f2..95ab31dae0 100644
--- a/spec/quality_spec.rb
+++ b/spec/quality_spec.rb
@@ -251,10 +251,10 @@ RSpec.describe "The library itself" do
]
files_to_require = lib_tracked_files.split("\x0").grep(/\.rb$/) - exclusions
files_to_require.reject! {|f| f.start_with?("lib/bundler/vendor") }
- files_to_require.map! {|f| f.chomp(".rb") }
- sys_exec!("ruby -w -Ilib") do |input, _, _|
+ files_to_require.map! {|f| File.expand_path("../#{f}", __dir__) }
+ sys_exec!("ruby -w") do |input, _, _|
files_to_require.each do |f|
- input.puts "require '#{f.sub(%r{\Alib/}, "")}'"
+ input.puts "require '#{f}'"
end
end