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

Catch exits in spec_helper and raise an exception that can be handled in other specs #910

Merged
merged 2 commits into from
Jan 15, 2025

Conversation

viktorerlingsson
Copy link
Member

@viktorerlingsson viktorerlingsson commented Jan 14, 2025

WHAT is this pull request doing?

Defines exit in spec_helper so we can catch any program exits and instead raise an exception that we can handle in other specs.

HOW can this pull request be tested?

Run specs.

@viktorerlingsson viktorerlingsson requested a review from a team as a code owner January 14, 2025 09:58
@viktorerlingsson viktorerlingsson removed the request for review from a team January 14, 2025 09:58
@spuun
Copy link
Member

spuun commented Jan 14, 2025

exit should be exit(status = 0) and the exception should accept the status and expose it in a property. Then one can rescue it and check the status.

@viktorerlingsson
Copy link
Member Author

exit should be exit(status = 0) and the exception should accept the status and expose it in a property. Then one can rescue it and check the status.

Yes, agreed 👍

@viktorerlingsson viktorerlingsson changed the title WIP: catch exits in spec_helper and raise an exception that can be handled in other specs Catch exits in spec_helper and raise an exception that can be handled in other specs Jan 15, 2025
@viktorerlingsson viktorerlingsson merged commit 4e0a719 into main Jan 15, 2025
16 checks passed
@viktorerlingsson viktorerlingsson deleted the catch-exit-in-specs branch January 15, 2025 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants