Skip to content

Commit

Permalink
try to fix tests on new machine
Browse files Browse the repository at this point in the history
  • Loading branch information
houen committed Apr 3, 2023
1 parent 4b35979 commit c7c86a1
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions test/real/minitest_rerun_failed_test.rb
Expand Up @@ -2,6 +2,10 @@

require "test_helper"

def output_dir(fail_test_name)
"#{__dir__}/../test_output/#{fail_test_name}"
end

# Which number test to run and fail
FAIL_TEST_NAME = ENV["FAIL_TEST_NAME"]

Expand All @@ -21,7 +25,7 @@
Minitest::Reporters.use!(
[
Minitest::Reporters::FailedTestsReporter.new(
output_path: "./test_output/#{FAIL_TEST_NAME}"
output_path: output_dir(FAIL_TEST_NAME)
)
]
)
Expand Down Expand Up @@ -60,8 +64,9 @@ def raise_self(fail_msg = nil)
end

def fail_self_file_output
p output_dir(FAIL_TEST_NAME)
fail_self
File.read("./test_output/#{name}/.minitest_failed_tests.txt")
File.read("#{output_dir(FAIL_TEST_NAME)}/.minitest_failed_tests.txt")
end

def test_that_it_has_a_version_number
Expand Down

0 comments on commit c7c86a1

Please sign in to comment.