seattlerb/zentest — pull request #59 by keroami (2014-06-17 11:12:49+00:00)
Title: Fix: let autotest trigger on new files after the first run

autotest would not detect any new file after the first run; very annoying when doing coding katas, still annoying on other projects.

Writing a test would be hard, since I'd have to either mock Find.find, or actually create files. Trying to extract Find.find (so I could test the remainder, but also replace it with e.g. rbinotify) is even harder, since a lot more happens than just finding files:
- Filtering certain patterns (what is isolate? why RCS? why not git? Perhaps a $HOME/.autotest could harbour add_exception statements for these kind of things?)
- partially sorting file names (targets are not sorted; probably intentional) and storing them in a field (side-effect, if you ask me).
- returning mtimes (I'd expect the files by themselves)

I would change a lot if I were to refactor that code. Which is not worth it for the bugfix by itself; but also not sensible without discussing beforehand. So. No test.

Hope you still merge.

Bye,
Kero.