Agile Web Development with Rails 8: Part II, Chapter 7, Task 7B. Wrong code listing page 94

In a test "image url" there are a couple of product creations and assertions of validity. However text afterwards states that:

Rather than write the nine separate tests, we’ve used a couple of loops—one to check the cases we expect to pass validation and the second to try cases we expect to fail

The code listing does not include any loops.