The weird thing about it is that it fails sometimes! Especially if I run
the whole test suite with rake command (the probability is higher). When
I check in the console post indeed has 11 comments. Can somebody give me
a reasonable explanation why this is happening? Is this some sort of a
race condition that I'm missing?
No because validations happen before the object is saved. Validation
will pass and the object will get saved properly. Well... sometimes.
Sometimes not.