rspec_rails_4 icon indicating copy to clipboard operation
rspec_rails_4 copied to clipboard

Ch.5, p.53 - Contact sort order in spec

Open olerass opened this issue 11 years ago • 0 comments

This is more a question than an actual issue.

Regarding the spec on page 53, what about the requirement that contacts should be returned in sorted (ascending) order according to the last name? There's no spec to check this in the controller spec. Should there be? The contact model spec covers this requirement, but should it also be tested in the controller? Why/why not?

In general it seems the book doesn't address this issue at all - e.g. which features should we test at which layers? I'm only at chapter 6 so it may do so later, but if not, consider adding a note about this.

Book version: 2013-10-29 (PDF)

olerass avatar Nov 02 '13 13:11 olerass