Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix flaky tests #1116

Merged
merged 1 commit into from
Sep 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions test/console/catch_test.rb
Original file line number Diff line number Diff line change
@@ -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