autotest-inotify icon indicating copy to clipboard operation
autotest-inotify copied to clipboard

Gem needs to be required before any Autotest configure block in .autotest

Open sigi opened this issue 14 years ago • 4 comments

I've found that requiring the gem at the end of .autotest does not work if there's an autotest configure block present (autotest-inotify does not seem to get loaded in that case). I wanted to put the require statement there to ensure that autotest-inotify is required last, so maybe others will run into the same problem by accident.

Maybe there should be a note in the README pointing this out.

sigi avatar Sep 01 '10 14:09 sigi

Can you give a more concrete example of what you mean by "autotest configure block"? I'm not able to duplicate your issue.

Sorry for the slow response. Personal issues have kept me away from the site.

ewollesen avatar Sep 19 '10 20:09 ewollesen

I was talking about the :initialize hook that I have added in my .autotest file in order to change some settings from the defaults.

Mine goes something like

Autotest.add_hook :initialize do |at|
  at.unit_diff = 'unit_diff'
  at.find_directories = ['app', 'lib', 'test', 'config']
  at.sleep = 2
end

(which is in the .autotest file), and if the require "autotest/inotify" statement comes after that, instead of before, there is no inotify-enhanced behaviour).

sigi avatar Oct 01 '10 15:10 sigi

I'm still unable to reproduce your problem. Please see https://github.com/ewollesen/at_demo. I'm using this project to try and test, and things are working as expected as far as the .autotest is concerned.

ewollesen avatar Jan 13 '11 02:01 ewollesen

Just hit this one. You need to return falsy values on hook handler.

See this comment: https://github.com/seattlerb/zentest/blob/master/lib/autotest.rb#L825

markiz avatar Aug 29 '12 01:08 markiz