Skip to content

Commit

Permalink
Merge pull request metaskills#108 from jlsherrill/relative
Browse files Browse the repository at this point in the history
Fix running parallel tests with relative paths
  • Loading branch information
metaskills committed Apr 30, 2021
2 parents 662585f + af25e6c commit 4091826
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/minitest-spec-rails/parallelize.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def describe *args, &block
cls_const = "Test__#{cls.name.to_s.split(/\W/).reject(&:empty?).join('_'.freeze)}"
if block.source_location
source_path, line_num = block.source_location
source_path = Pathname.new(source_path).relative_path_from(Rails.root).to_s
source_path = Pathname.new(File.expand_path(source_path)).relative_path_from(Rails.root).to_s
source_path = source_path.split(/\W/).reject(&:empty?).join("_".freeze)
cls_const += "__#{source_path}__#{line_num}"
end
Expand Down

0 comments on commit 4091826

Please sign in to comment.