rspec_rails_4 icon indicating copy to clipboard operation
rspec_rails_4 copied to clipboard

Ch.6, p.67 - Magic code

Open olerass opened this issue 11 years ago • 1 comments

This code example on page 67 should just be the previous spec code (from chapter 5) surrounded by a describe block that logs in as admin. However, the spec code illustrated inside the describe block is vastly different from the one in chapter 5 and thus quite confusing. Just to mention a few differences:

  • This code uses a @contact variable in all tests instead of the local variables in chapter 5
  • Some of the test names don't match (e.g. the ch.5 spec has populates an array of contacts starting with the letter but the equivalent test in this code seems to be populates an array of contacts with a different body)

Book version: 2013-10-29 (PDF)

olerass avatar Nov 03 '13 17:11 olerass

I thought @contact is missing in page 67 too.

JunichiIto avatar Feb 11 '14 09:02 JunichiIto