I have a few ActiveRecord subclasses that reassign their default scope
upon instantiation based on some criteria (i.e. subclasses of the AR
model Person will change their default scope according to rows found
in the `roles` table). This works find during development, but during
testing this fails because the fixtures (which contain the `roles`
items) are not loaded until after the models are causing an exception
to be raised.
Is there any way to have fixtures loaded earlier on in the testing
process, or is there some proper Rails-provided way to seed the test
database?
Thanks,
—matt
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.