Skip to content

Commit 8d4205a

Browse files
fbacallCopilot
andauthored
Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 375a469 commit 8d4205a

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

app/models/concerns/has_test_job.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@ def test_job_id_key
5353

5454
def test_results_path
5555
path_id = Rails.env.test? ? "fakeid_#{model_name.singular}_#{id}" : test_job_id
56-
Rails.root.join('tmp', 'source_test_results').tap { |d| d.mkdir unless d.exist? }.join("test_results_#{path_id}.yml")
56+
dir = Rails.root.join('tmp', 'source_test_results')
57+
dir.mkpath
58+
dir.join("test_results_#{path_id}.yml")
5759
end
5860

5961
def deep_hashify(params)

0 commit comments

Comments
 (0)