From ef5e54cd75cb20b4085bdc77de9105a19af55a2e Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Mon, 2 Sep 2024 12:51:28 +0900 Subject: [PATCH] Fix flaky tests "1234" is too short and may be included in tempfile paths. --- test/console/catch_test.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/console/catch_test.rb b/test/console/catch_test.rb index 164ac4288..d4addf997 100644 --- a/test/console/catch_test.rb +++ b/test/console/catch_test.rb @@ -44,29 +44,29 @@ def test_catch_command_isnt_repeatable def test_catch_works_with_command debug_code(program) do - type 'catch ZeroDivisionError pre: p "1234"' + type 'catch ZeroDivisionError pre: p "catching zero division"' assert_line_text(/#0 BP - Catch "ZeroDivisionError"/) type 'continue' - assert_line_text(/1234/) + assert_line_text(/catching zero division/) type 'continue' type 'continue' end debug_code(program) do - type 'catch ZeroDivisionError do: p "1234"' + type 'catch ZeroDivisionError do: p "catching zero division"' assert_line_text(/#0 BP - Catch "ZeroDivisionError"/) type 'continue' - assert_line_text(/1234/) + assert_line_text(/catching zero division/) type 'continue' end end def test_catch_works_with_condition debug_code(program) do - type 'catch ZeroDivisionError if: a == 2 do: p "1234"' + type 'catch ZeroDivisionError if: a == 2 do: p "catching zero division"' assert_line_text(/#0 BP - Catch "ZeroDivisionError"/) type 'continue' - assert_no_line_text(/1234/) + assert_no_line_text(/catching zero division/) type 'continue' end end