rspec_rails_4
rspec_rails_4 copied to clipboard
Ch.6, p.67 - Magic code
trafficstars
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
@contactvariable 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 letterbut the equivalent test in this code seems to bepopulates an array of contactswith a different body)
Book version: 2013-10-29 (PDF)
I thought @contact is missing in page 67 too.