diff --git a/test/minitest/retry_test.rb b/test/minitest/retry_test.rb index 81cef7e..7b3b1f0 100644 --- a/test/minitest/retry_test.rb +++ b/test/minitest/retry_test.rb @@ -47,10 +47,12 @@ def fail end Minitest::Runnable.run_one_method(retry_test, :fail, self.reporter) end + + path = Gem::Version.new(Minitest::VERSION) >= Gem::Version.new("5.21.0") ? "test/minitest/retry_test.rb" : __FILE__ expect = <<-EOS -[MinitestRetry] retry 'fail' count: 1, msg: RuntimeError: parsing error\n #{__FILE__}:45:in `fail' -[MinitestRetry] retry 'fail' count: 2, msg: RuntimeError: parsing error\n #{__FILE__}:45:in `fail' -[MinitestRetry] retry 'fail' count: 3, msg: RuntimeError: parsing error\n #{__FILE__}:45:in `fail' +[MinitestRetry] retry 'fail' count: 1, msg: RuntimeError: parsing error\n #{path}:45:in `fail' +[MinitestRetry] retry 'fail' count: 2, msg: RuntimeError: parsing error\n #{path}:45:in `fail' +[MinitestRetry] retry 'fail' count: 3, msg: RuntimeError: parsing error\n #{path}:45:in `fail' EOS refute reporter.passed?