Skip to content

Instantly share code, notes, and snippets.

@valera-rozuvan
Created April 7, 2014 10:16
Show Gist options
  • Save valera-rozuvan/10017776 to your computer and use it in GitHub Desktop.
Save valera-rozuvan/10017776 to your computer and use it in GitHub Desktop.
How git cleans files upon rake test:acceptance ...
When you run
rake test:acceptance ...
then the following shell command is executed
git clean -fqdx test_root/logs test_root/data test_root/staticfiles test_root/uploads
@valera-rozuvan
Copy link
Author

To add to the list of auto-cleaned files automatic screenshots:

desc "Clean fixture files used by tests, .pyc files, and automatic screenshots"
sh("git clean -fqdx test_root/logs test_root/data test_root/staticfiles test_root/uploads")
sh("find . -type f -name \"*.pyc\" -delete")
sh("rm -rf test_root/log/auto_screens/*")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment