On Jan 27, 11:46 am, GregD <[email protected]> wrote: > Hey all, > > I'm trying to test integration/string test parts of a 3rd party java > application and unfortunately it looks like I have to use fixtures to > initialize the string/integration tests. Well, it looks like using > fixtures will be easier or at least easier for this group of > developers to follow. ;( Anyway, using sequel as my ORM and rspec > 1.3 I have done some successful testing of java and DB stored > procedures, but these were closer to unit tests. Now, I'm doing more > functional testing which will require much more data. I'd love to use > factories, but like I said this group needs to see the data. ;( So, > with the amount of data I have to load into the database int > initialize the testing, I'm stuck using fixtures. Again, another :( > > My questions are: > 1) What is the best way to clean the database of the fixtures?
Personally, I keep the database clean and run each spec/test inside a transaction. Since the fixtures are loaded inside of the transaction, there's nothing to clean up. In the cases I can't do that, I usually just delete from all affected tables in an after block. > 2) Has anyone used Jeremy's fixture_dependencies with composite > primary keys? I seem have found a bug in it, maybe when I load > association with composite primary keys. > > I get an undefined method 'to_sym' for [:key1, :key2]:Array fixture_dependencies doesn't currently support composite keys. So it's not a bug, just the lack of a feature. :) I'll accept patches to add composite key support to fixture_dependencies, but it's not something I plan to add myself. Jeremy -- You received this message because you are subscribed to the Google Groups "sequel-talk" 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/sequel-talk?hl=en.
