Dave Aronson wrote:
[...]
> It seemed to me
> that the OP's objective was to avoid reloading the database for each
> test, which isn't any more *human* work than doing it once (at least,
> having it in the standard setup section versus each test).  Hence his
> objective is probably *speed*, which is also important for tests, in
> order to run them frequently.  Having a trigger, or constraint, or
> other such mechanism, on something that isn't supposed to happen, is
> bound to be faster than frequently reloading a huge database.

Faster than reloading?  Perhaps.  Faster than rolling back a 
transaction?  Doubtful.  Faster than truncating a bunch of tables and 
writing tests so they don't involve lots of unnecessary records?  Almost 
certainly not.

(Yes, I said "unnecessary".  You really don't need the entire constant 
table for tests.)

> 
> -Dave

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
[email protected]
-- 
Posted via http://www.ruby-forum.com/.

-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to