Images uploaded by tests no longer stick around forever#37
Open
Images uploaded by tests no longer stick around forever#37
Conversation
…ally get deleted after the test suite finishes running
Contributor
|
Like this a lot! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Images which get uploaded as a result of the test suite being run now go into public/uploads/test (by changing store_dir in the AvatarUploader to check if it’s running in the test environment). Images you upload by interacting with the app via localhost will still be stored on your machine (in public/uploads/model_name etc).
spec_helper now has an after(:all) block to delete image files from the specific path for user avatars (there’s a way to do this without hard-coding the path, but I’m treading lightly here - if we have image uploads in other places later this will need to be addressed).
The whole /uploads directory is in .gitignore already, so no changes made there. I can’t think of any reason we’d want to change this, but I’m noting it here just in case.