On Mar 21, 1:21 pm, Jeremy Evans <[email protected]> wrote: > Looking at your gist, the easiest way to handle things would be to > define the schema correctly the first time, define your models, then > rebuild the schema for each test:https://gist.github.com/879901
Thanks Jeremy, that is a good idea. Unfortunately, this would force me to apply plugins and assign datasets _outside_ the setup/tear-down routines _every time_ the setup/tear-down routines are invoked. See the comment in this gist, and particularly, please note lines 18-20: https://gist.github.com/880051 Not only does this cause needless code duplication within the script, but it runs contrary to my (confused?) opinion that plugins and dataset assignments are setup/tear-down activities by definition, and therefore should be part of those routines. Furthermore, if I let myself define the setup/tear-down routine in two places, I might cry. ;-) > If your are using a database that supports transactional schema > modifications, such as PostgreSQL, you can just run each test case > inside a database transaction. This is another very good idea. I _am_ using PostgreSQL, and this would be a perfectly reasonable thing to do... but I can imagine that the limit this would place on the way I could exercise the data models would be overly restrictive for my purposes. I really do appreciate the time you are taking to reply to my questions, Jeremy. However, I fear that I am just going to have to somehow redefine the Sequel::Model(source) method from model.rb so that I can avoid pestering you with this triviality any further. -Nels -- 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.
