Basically the problem was that while rspec is running, the listen gem found that infame file and then makes it run again.
Using inotifywatch -m, I can see the file is being created:
foo/ CREATE 4913
foo/ OPEN 4913
foo/ ATTRIB 4913
foo/ CLOSE_WRITE,CLOSE 4913
foo/ DELETE 4913
I found two things I believe they might be interesting:
1. This happens after the first save, so I guess it has to do over existing files.
2. I found that running this with no vimrc, `vim -u NONE -U none`, doesn't show this problem. After a lot of trial & error, I found that the problem has to do specifically with the `set nocompatible` option. Even more, just running `set compatible` and then saving the document, doesn't create/delete the 4913 file.
Is this actually the expected behaviour or is it a strange bug?
I know the offending line is this one: https://code.google.com/p/vim/source/browse/src/fileio.c#3693, but I still don't get it :c
* https://groups.google.com/d/topic/vim_dev/sppdpElxY44/discussion