Skip to content

Images uploaded by tests no longer stick around forever#37

Open
KyeBracey wants to merge 1 commit intomasterfrom
13-configuring-test-image-cleanup
Open

Images uploaded by tests no longer stick around forever#37
KyeBracey wants to merge 1 commit intomasterfrom
13-configuring-test-image-cleanup

Conversation

@KyeBracey
Copy link
Owner

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.

…ally get deleted after the test suite finishes running
@dmcd84
Copy link
Contributor

dmcd84 commented Jul 14, 2017

Like this a lot! :shipit:

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.

2 participants