summaryrefslogtreecommitdiff
path: root/spec/support/matchers.rb
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2020-01-03 10:15:15 +0100
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2020-01-03 10:27:46 +0100
commit2e70a1934e65fff0b1eed36ebf2f9d83e9fbe81b (patch)
treeb68795dd4d754354093a1e8ae2da9131a2079f88 /spec/support/matchers.rb
parente70d0f3d02c8c084b61969e71d1fa28a15a6d0ca (diff)
downloadbundler-2e70a1934e65fff0b1eed36ebf2f9d83e9fbe81b.tar.gz
Use standard require paths for names with dashes in specs
Diffstat (limited to 'spec/support/matchers.rb')
-rw-r--r--spec/support/matchers.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/support/matchers.rb b/spec/support/matchers.rb
index e1a08a30cc..df35854c2f 100644
--- a/spec/support/matchers.rb
+++ b/spec/support/matchers.rb
@@ -128,7 +128,7 @@ module Spec
groups << opts
@errors = names.map do |name|
name, version, platform = name.split(/\s+/)
- require_path = name == "bundler" ? "#{lib_dir}/bundler" : name
+ require_path = name == "bundler" ? "#{lib_dir}/bundler" : name.tr("-", "/")
version_const = name == "bundler" ? "Bundler::VERSION" : Spec::Builders.constantize(name)
begin
run! "require '#{require_path}.rb'; puts #{version_const}", *groups
@@ -145,7 +145,7 @@ module Spec
next unless source
begin
source_const = "#{Spec::Builders.constantize(name)}_SOURCE"
- run! "require '#{name}/source'; puts #{source_const}", *groups
+ run! "require '#{require_path}/source'; puts #{source_const}", *groups
rescue StandardError
next "#{name} does not have a source defined:\n#{indent(e)}"
end