I gave up on transactional fixtures. Instead, I make sure everytime I
create a model using dm-sweatshop, it always passes in a unique email
address or username for example so it won't violate the unique
constraint. Seems to be working okay.

On Nov 24, 3:23 pm, Ashley Moran <[email protected]>
wrote:
> On 23 Nov 2009, at 03:34, trung wrote:
>
> > I supposed I could do away with transactional fixture and truncate my
> > table before every test...
>
> I can't what's going wrong with your code, so unfortunately I can't solve you 
> actual problem.  But, FWIW, I do what you are considering, and reset the 
> database using `Model.all.destroy!`.  Just have to do it in the right order 
> to avoid integrity constraint violations.
>
> Ashley
>
> --http://www.patchspace.co.uk/http://www.linkedin.com/in/ashleymoran

--

You received this message because you are subscribed to the Google Groups 
"DataMapper" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/datamapper?hl=en.


Reply via email to