Forum: Ruby on Rails Error in AWDR book: page 176

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Christer N. (Guest)
on 2005-11-20 22:27
This is a performance test adding 100 orders, and one lineitem. In
teardown, when deleting the first order, the lineitem can't be deleted
as it is referenced by 99 other orders. (One order has many lineitems).
So test_save_bulk_orders fails.

My suggestion is to change teardown:

def teardown

or adding one lineitem per order in the fixture.
This topic is locked and can not be replied to.