Hi Matt, I bought the RSpec Book at the same time as I bought the Cucumber Book, mainly because you constantly refer to it as a great resource for finding the fine line between integration and unit tests, or maybe its more accurate to say “the movable line between where cucumber is the appropriate tool, and where rspec is the appropriate tool”.
I’ve read through both books twice now, once skipping around and then once straight through (in hope of clarifying things that were fuzzy after skipping around).
The Cucumber Book was clear and directed. I was/am a bit frustrated by the lack of detail on best use of support code and/ unit tests when working with rails projects, as well the not-quite detailed enough explanation of the cucumber World. I really don’t want to spend time writing brittle tests and the use of support code/unit tests/the world seem to be the key to avoiding that. (The likelihood of brittle tests seems high when you’re dealing with a rails application, in which by nature the UI plays a big part and needs to be tested / checked somewhere/somehow)
Based on the asides in the book and your responses on this forum and in other web viewable content, I expected the RSpec book to help me with sorting out where to use rspec and where to use cucumber. I was wrong.
In contrast to the Cucumber Book, which seemed crafted, The RSpec Book was all over the place. It is hard to get through 5 pages of it without encountering a reference to something that will be explained 1/2/10/20 pages later. The bulk of the book is a rehash of the docs for rspec, listing various aspects (Expectations and Mocks, as well as how to extend rspec) without giving any decent, non-brittle code to work through. Geez, most of the worked through examples in the rspec book aren’t even worked through, instead you’re told to download the code from the website.
I suppose that before The Cucumber Book was written The RSpec Book was cool/relevant/the only reference around, but at this point, it is dated, spending lots of pages on orphaned technology (webrat), and full of brittle examples of how to test code.
It would be great if you would get into more detail on where to use rspec vs where to use cucumber as well as more use of world and support code, instead of referring folks to the rspec book, because it doesn’t really help with those things.