Factory Girl doesn't seem to rollback the data for the specs.

98 views
Skip to first unread message

chris

unread,
Dec 6, 2009, 12:30:36 PM12/6/09
to factory_girl
I keep running into unique contraints that are fired when running
tests. Factory Girl doesn't seem to want to rollback the database
between tests.

Right now I have all the default settings in place.

Is there something that I am missing to get the rollback to happen?

Michael Breen

unread,
Dec 8, 2009, 6:55:41 PM12/8/09
to factor...@googlegroups.com
Does your spec_helper have transactional fixtures turned on?

Spec::Runner.configure do |config|
config.use_transactional_fixtures = true
config.use_instantiated_fixtures = false
end

Best.
Mike
> --
> Individuals over processes. Interactions over tools. Agile Rails training from thoughtbot, the makers of Clearance, Shoulda, & Factory Girl:
> http://thoughtbot.com/services/training
>
> You received this message because you are subscribed to the "factory_girl" mailing list.
> To post to this group, send email to factor...@googlegroups.com
> To unsubscribe from this group, send email to
> factory_girl...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/factory_girl?hl=en

Reply all
Reply to author
Forward
0 new messages