Skip to content

Instantly share code, notes, and snippets.

@vapidbabble
Created September 17, 2013 03:14
Show Gist options
  • Select an option

  • Save vapidbabble/6589664 to your computer and use it in GitHub Desktop.

Select an option

Save vapidbabble/6589664 to your computer and use it in GitHub Desktop.
This is a simple problem for which I need help writing tests in Ruby (minitest Rspec whatever). I've written the code already in another language. It just seems when I'm writing tests for 'how' something should work I keep skipping to the making it work part.
Loop through a given directory's subdirectories ( 1 deep)
In each subdirectory check only files that are older than a day.
If the file is a PDF file or zero byte move to an archive directory and log.
At the end, mail the list of files, if any, to somebody.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment