Is it not possible to load fixtures with ID of 0? Is there a way to force it?
TIA
Is it not possible to load fixtures with ID of 0? Is there a way to force it?
TIA
Just don’t specify an ID at all.
Wouldn't it just auto increment though?
The ID of a fixture record should actually be irrelevant. IMO you should NEVER use ID as a basis for any part of your tests. There simply isn't a need and it leads to fragile tests almost every time. For instance
User.find(1) can be users(:something_useful)
if assigns(:user) == 34 can be if assigns(:user) == users(:some_user).id
In almost every case its clearer without the ID. In Rails 2 you don't even need to specify ID's anymore and its about time.