First failure I checked was this one:
it 'should not touch target directory unless running' do
mkpath 'target' ; File.utime @early, @early, 'target'
@filter.from('src').into('target').exclude('*').run
File.mtime('target').should be_close(@early, 10)
end
Can this ever work? On many systems you're not allowed to set the mtime
of a file/dir to a time in the past. The pickaxe even states that utime
does not work on all systems. It's probably safer to read the mtime,
sleep, run the filter and then check the mtime again. How do you do
java.lang.Thread#sleep in ruby?
Pepijn