I have just read “Rails 4 Test Prescriptions” and I didn’t like it. The book has some significant flaws:
Bad English. I’m not a native English speaker, and the book has many such frases where I can distinctly understand every word - but not the whole sentence. The author could use some more obvious single-meaning phrases, and the majority of programming manuals do.
The use of “CreatesProject” class etc. Such proxy classes do not fit into the classic Rails concept - at least, the scaffold generators do not produce them. So, the author did not have right to base his book on such objects (and some kind view “presenters” also). If the author liked “CreatesProject” - he could describe it in a separate optional chapter - but not throughout the whole book.
I personally strongly disagree using whatever “CreatesProject” classes - and, meanwhile I do need to learn Rails testing.
Using “CreatesProject” throughout the whole book was truly disgusting. I am very angry. The author should not touch the Rails scaffolded code main concepts. This book is supposed to be about testing Rails - and not about perfectionating the Rails architecture. If a needed it - I would pick another book. Whether Rails architecture is good or bad - this is none of the business of an author describing Rails testing - this is not why am I buying a book about testing.
Too complicated code samples. Beginning with the time-depending tests and further. Things like time-dependent tests should be put to some very last chapters - not to pretty much beginning of the book. I don’t need whatever time-dependent tests complications while I still (book beginning) don’t understand the main testing philosophy yet.
An obvious lack of the author’s profound testing experience. After reading this book I got a feeling that the author is not a Rails testing guru. And, if he is not - then why is he writing a book about it? At least I have such a feeling now that I see the trees - but not the forest. I still am not sure whether I should use Rails testing at all and whether it is a pointless loss of time. The book didn’t convince me to use TDD or BDD. The author did not put enough effort into writing that book. 25-30% of the book content is useless.
It was funny reading the stupid last chapter. It just showed how unqualified the book author was and discredited the idea of Rails testing generally. If an old code has no tests - that you can do nothing with it - other than rewriting all from scratch in a BDD-driven manner. Author, have you ever seriously tried to do what you are writing about? Except for some simple student projects? Looks like you are just kidding me.
As a summary, I would not recommend buying that book. I personnally would write a much better book (provided I’m really sure that Rails testing is really needed - which is not).