I read some source code of ZenTest but didn't find where it is implemented.
Could you give me give some clue? Thanks in advance.
I read some source code of ZenTest but didn't find where it is implemented.
Could you give me give some clue? Thanks in advance.
It looks like its in autotest.rb
the method is called find_files_to_test
, the algorithm is pretty basic, every second it checks the dates on all the files that affect testing and then, using some dependency analysis on the changed files, it decides which tests to run.
In Windows this would be significantly faster if it used a file system watcher.
The sleep time is defined initialize self.sleep = 1
and invoked from wait_for_changes
Kernel.sleep self.sleep until find_files_to_test