rspec_rails_4 icon indicating copy to clipboard operation
rspec_rails_4 copied to clipboard

Ch.4, p.39 - Weird example

Open olerass opened this issue 11 years ago • 1 comments

On page 39, line 5 we have the following:

So far, if we wanted to specify a non-home phone in a spec we've done it like this:[code example follows]

There are two issues here:

  • The example following this sentence is an updated version of the duplicate contact numbers test which uses FactoryGirl. However, the sentence refers to the fact that we have been using FactoryGirl all along which is confusing. Perhaps the problem lies in the fact that present tense is used; "we've done it like this"., which we of course haven't since this is a newly introduced example. A possible solution may be to use past tense, e.g. "we would have done it like this"
  • The sentence talks about specifying non-home phone numbers and provides the following code as example, but the example code doesn't specify non-home phone numbers.

To sum up: rephrase the sentence to focus on the fact that IF we wanted to use different phone number types, THEN it would look like the example. Also, use an example that actually illustrates the point by creating two different phone number types.

Book version: 2013-10-29 (PDF)

olerass avatar Oct 31 '13 18:10 olerass

The sentence talks about specifying non-home phone numbers and provides the following code as example, but the example code doesn't specify non-home phone numbers.

I think so too.

JunichiIto avatar Jan 18 '14 09:01 JunichiIto