views:

73

answers:

1

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.

+1  A: 

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
Sam Saffron
Sambo99, thanks for you explanation. But I still can't find where the 1 second interval is defined, could you please point me out the code?
eric2323223
expanded the answer
Sam Saffron
I see. Thanks :)
eric2323223