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

FileUtils: Fix leaky specs #5370

Merged
merged 1 commit into from Dec 11, 2017

Conversation

woodruffw
Copy link
Contributor

Some of the specs for FileUtils.mkdir and FileUtils.mkdir_p were leaking directories in /tmp between runs. This commit fixes them.

Copy link
Member

@straight-shoota straight-shoota left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the removals shouldbe in an ensure block. Otherwise failing expectations or arbitrary exceptions would prohibit a proper clean-up.

This commit fixes specs for `FileUtils.mkdir` and `FileUtils.mkdir_p`
that left temporary directories on disk after completing.
@woodruffw
Copy link
Contributor Author

All the removals shouldbe in an ensure block. Otherwise failing expectations or arbitrary exceptions would prohibit a proper clean-up.

Fixed!

@jhass jhass merged commit bc56810 into crystal-lang:master Dec 11, 2017
@jhass
Copy link
Member

jhass commented Dec 11, 2017

Thanks!

@bcardiff bcardiff added this to the Next milestone Dec 11, 2017
@woodruffw woodruffw deleted the fileutils-leaky-specs branch December 11, 2017 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants