"Mark Wilden" <[EMAIL PROTECTED]> writes: > On Tue, Nov 4, 2008 at 4:26 PM, Pat Maddox <[EMAIL PROTECTED]> wrote: > > aslak's right though in that case too. In your spec_helper, just loop > over the tables and delete everything, then insert the seed data you > want, and it should be good to go. > > But then Ashley's comment applies: you've got the same facts in two places. > Best thing is to > avoid the dependency, if at all possible.
Sure, but you can encapsulate all that stuff too. When I've done stuff like this in the past (and on second thought I have done it just as aslak suggested, I just didn't think of it :) we've created some seed data builders. Then it becomes a simple matter of SeedData.build_data to kick off the whole deal. Pat _______________________________________________ rspec-users mailing list [email protected] http://rubyforge.org/mailman/listinfo/rspec-users
