Rails, RSpec and Autotest hate your blog
Something very amusing happened to me, I'll try to sum it up:
I'm working on a website for which I have to write a blog for it, so after I created the models for it, I create the controller for the posts with script/generate rspec_controller admin/blog/posts
Soon enough, I realize that (after reload of course) script/autospec just doesn't "see" the file I just created, and therefore doesn't run any test in it... The strangest thing is that rake spec run all the tests perfectly...
I try many things, changing permissions, add and remove another controller to reload some "cache" that would be hidden somewhere, etc. without success
So I rename the "blog" folder to "bar" ... it works; then I start renaming "bar" to "blog" progressively to see where's the problem : 'barg' ok; 'barog' ok; 'barlog' no!
OF COURSE !!! Obviously folders ending with log are ignored, rule made for the folder RAILS_ROOT+'/log' I guess ...
I lost more than an hour on this problem, and while it's not really a problem anymore for the development of the website, since I just renamed the folder, I still don't know how to correct it... any ideas ?
Gems used: rails (2.3.4), autotest-rails (4.1.0), rspec (1.2.8), rspec-rails (1.2.7.1), ZenTest (4.1.4)
EDIT: Olivier found a quick hack before it gets fixed : remove "log/" from the exceptions list (line 29) in rspec-rails-1.2.7.1/lib/autotest/rails_rspec.rb and add "log/development.log log/production.log log/test.log log/server.log"
The bug seems to be caused by the line 344 of ZenTest-4.1.4/lib/autotest.rb : Find.prune if f =~ self.exceptions





