Skip to content

Commit ef5e54c

Browse files
nobuko1
authored andcommitted
Fix flaky tests
"1234" is too short and may be included in tempfile paths.
1 parent 79cdcfa commit ef5e54c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

test/console/catch_test.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,29 +44,29 @@ def test_catch_command_isnt_repeatable
4444

4545
def test_catch_works_with_command
4646
debug_code(program) do
47-
type 'catch ZeroDivisionError pre: p "1234"'
47+
type 'catch ZeroDivisionError pre: p "catching zero division"'
4848
assert_line_text(/#0 BP - Catch "ZeroDivisionError"/)
4949
type 'continue'
50-
assert_line_text(/1234/)
50+
assert_line_text(/catching zero division/)
5151
type 'continue'
5252
type 'continue'
5353
end
5454

5555
debug_code(program) do
56-
type 'catch ZeroDivisionError do: p "1234"'
56+
type 'catch ZeroDivisionError do: p "catching zero division"'
5757
assert_line_text(/#0 BP - Catch "ZeroDivisionError"/)
5858
type 'continue'
59-
assert_line_text(/1234/)
59+
assert_line_text(/catching zero division/)
6060
type 'continue'
6161
end
6262
end
6363

6464
def test_catch_works_with_condition
6565
debug_code(program) do
66-
type 'catch ZeroDivisionError if: a == 2 do: p "1234"'
66+
type 'catch ZeroDivisionError if: a == 2 do: p "catching zero division"'
6767
assert_line_text(/#0 BP - Catch "ZeroDivisionError"/)
6868
type 'continue'
69-
assert_no_line_text(/1234/)
69+
assert_no_line_text(/catching zero division/)
7070
type 'continue'
7171
end
7272
end

0 commit comments

Comments
 (0)